Message ID | 1524557112-2455-1-git-send-email-alin.nastac@gmail.com |
---|---|
State | Superseded |
Delegated to: | John Crispin |
Headers | show |
Series | [LEDE-DEV] iptables: link extension libraries with -lm | expand |
On 24/04/18 10:05, Alin Nastac wrote: > This fixes an iptables link error when kernel config include > CONFIG_NETFILTER_XT_MATCH_STATISTIC=y > related to the missing -lm argument on the linker command line. Error is caused by > the odd looking linker argument ${$*_LIBADD} which get expanded to an empty string. Hi, the $* usage is correct src/%.c: echo $* ->src/example (bei src/example.c) please provide your diffconfig so i can reproduce your issue locally. John > > Signed-off-by: Alin Nastac <alin.nastac@gmail.com> > --- > package/network/utils/iptables/patches/600-shared-libext.patch | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/package/network/utils/iptables/patches/600-shared-libext.patch b/package/network/utils/iptables/patches/600-shared-libext.patch > index a906d40..17e7fbe 100644 > --- a/package/network/utils/iptables/patches/600-shared-libext.patch > +++ b/package/network/utils/iptables/patches/600-shared-libext.patch > @@ -28,27 +28,27 @@ > -libext.a: initext.o ${libext_objs} > - ${AM_VERBOSE_AR} ${AR} crs $@ $^; > +libiptext.so: initext.o ${libext_objs} > -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; > ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; > > -libext_ebt.a: initextb.o ${libext_ebt_objs} > - ${AM_VERBOSE_AR} ${AR} crs $@ $^; > +libiptext_ebt.so: initextb.o ${libext_ebt_objs} > -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; > ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; > > -libext_arpt.a: initexta.o ${libext_arpt_objs} > - ${AM_VERBOSE_AR} ${AR} crs $@ $^; > +libiptext_arpt.so: initexta.o ${libext_arpt_objs} > -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; > ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; > > -libext4.a: initext4.o ${libext4_objs} > - ${AM_VERBOSE_AR} ${AR} crs $@ $^; > +libiptext4.so: initext4.o ${libext4_objs} > -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; > ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; > > -libext6.a: initext6.o ${libext6_objs} > - ${AM_VERBOSE_AR} ${AR} crs $@ $^; > +libiptext6.so: initext6.o ${libext6_objs} > -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; > ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; > > initext_func := $(addprefix xt_,${pfx_build_static}) > initextb_func := $(addprefix ebt_,${pfb_build_static})
Hi John, I forced CONFIG_NETFILTER_XT_MATCH_STATISTIC=y in my kernel config by adding it to openwrt/target/linux/brcm63xx/config-4.1 . However, you have to do a complete build from scratch, I noticed that removing iptables build directory and related files in openwrt/staging_dir/target-*/pkginfo directory rendered my build dir unusable. I use glibc-2.24 and gcc-5.3.0. Alin On Fri, Apr 27, 2018 at 8:41 AM, John Crispin <john@phrozen.org> wrote: > > > On 24/04/18 10:05, Alin Nastac wrote: >> >> This fixes an iptables link error when kernel config include >> CONFIG_NETFILTER_XT_MATCH_STATISTIC=y >> related to the missing -lm argument on the linker command line. Error is >> caused by >> the odd looking linker argument ${$*_LIBADD} which get expanded to an >> empty string. > > > Hi, > the $* usage is correct > > src/%.c: > echo $* > > ->src/example (bei src/example.c) > > please provide your diffconfig so i can reproduce your issue locally. > > John > > > >> >> Signed-off-by: Alin Nastac <alin.nastac@gmail.com> >> --- >> package/network/utils/iptables/patches/600-shared-libext.patch | 10 >> +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git >> a/package/network/utils/iptables/patches/600-shared-libext.patch >> b/package/network/utils/iptables/patches/600-shared-libext.patch >> index a906d40..17e7fbe 100644 >> --- a/package/network/utils/iptables/patches/600-shared-libext.patch >> +++ b/package/network/utils/iptables/patches/600-shared-libext.patch >> @@ -28,27 +28,27 @@ >> -libext.a: initext.o ${libext_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext.so: initext.o ${libext_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext_ebt.a: initextb.o ${libext_ebt_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext_ebt.so: initextb.o ${libext_ebt_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext_arpt.a: initexta.o ${libext_arpt_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext_arpt.so: initexta.o ${libext_arpt_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext4.a: initext4.o ${libext4_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext4.so: initext4.o ${libext4_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext6.a: initext6.o ${libext6_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext6.so: initext6.o ${libext6_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> initext_func := $(addprefix xt_,${pfx_build_static}) >> initextb_func := $(addprefix ebt_,${pfb_build_static}) > >
According to "Automatic variables" chapter of make manual, $* expands to the pattern matched by % in an implicit rule. However, the make rules in which this patch use the $* variable is an explicit rule, hence $* expansion will be empty. On Fri, Apr 27, 2018 at 8:41 AM, John Crispin <john@phrozen.org> wrote: > > > On 24/04/18 10:05, Alin Nastac wrote: >> >> This fixes an iptables link error when kernel config include >> CONFIG_NETFILTER_XT_MATCH_STATISTIC=y >> related to the missing -lm argument on the linker command line. Error is >> caused by >> the odd looking linker argument ${$*_LIBADD} which get expanded to an >> empty string. > > > Hi, > the $* usage is correct > > src/%.c: > echo $* > > ->src/example (bei src/example.c) > > please provide your diffconfig so i can reproduce your issue locally. > > John > > > >> >> Signed-off-by: Alin Nastac <alin.nastac@gmail.com> >> --- >> package/network/utils/iptables/patches/600-shared-libext.patch | 10 >> +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git >> a/package/network/utils/iptables/patches/600-shared-libext.patch >> b/package/network/utils/iptables/patches/600-shared-libext.patch >> index a906d40..17e7fbe 100644 >> --- a/package/network/utils/iptables/patches/600-shared-libext.patch >> +++ b/package/network/utils/iptables/patches/600-shared-libext.patch >> @@ -28,27 +28,27 @@ >> -libext.a: initext.o ${libext_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext.so: initext.o ${libext_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext_ebt.a: initextb.o ${libext_ebt_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext_ebt.so: initextb.o ${libext_ebt_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext_arpt.a: initexta.o ${libext_arpt_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext_arpt.so: initexta.o ${libext_arpt_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext4.a: initext4.o ${libext4_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext4.so: initext4.o ${libext4_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext6.a: initext6.o ${libext6_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext6.so: initext6.o ${libext6_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> initext_func := $(addprefix xt_,${pfx_build_static}) >> initextb_func := $(addprefix ebt_,${pfb_build_static}) > >
On 27/04/18 16:05, Alin Năstac wrote: > According to "Automatic variables" chapter of make manual, $* expands > to the pattern matched by % in an implicit rule. > However, the make rules in which this patch use the $* variable is an > explicit rule, hence $* expansion will be empty. > > > On Fri, Apr 27, 2018 at 8:41 AM, John Crispin <john@phrozen.org> wrote: >> >> On 24/04/18 10:05, Alin Nastac wrote: >>> This fixes an iptables link error when kernel config include >>> CONFIG_NETFILTER_XT_MATCH_STATISTIC=y >>> related to the missing -lm argument on the linker command line. Error is >>> caused by >>> the odd looking linker argument ${$*_LIBADD} which get expanded to an >>> empty string. >> >> Hi, >> the $* usage is correct >> >> src/%.c: >> echo $* >> >> ->src/example (bei src/example.c) >> >> please provide your diffconfig so i can reproduce your issue locally. >> >> John >> Hi, please try not to top post. and see if this fixes your issue please. --> https://pastebin.com/qbMfwGer John >> >>> Signed-off-by: Alin Nastac <alin.nastac@gmail.com> >>> --- >>> package/network/utils/iptables/patches/600-shared-libext.patch | 10 >>> +++++----- >>> 1 file changed, 5 insertions(+), 5 deletions(-) >>> >>> diff --git >>> a/package/network/utils/iptables/patches/600-shared-libext.patch >>> b/package/network/utils/iptables/patches/600-shared-libext.patch >>> index a906d40..17e7fbe 100644 >>> --- a/package/network/utils/iptables/patches/600-shared-libext.patch >>> +++ b/package/network/utils/iptables/patches/600-shared-libext.patch >>> @@ -28,27 +28,27 @@ >>> -libext.a: initext.o ${libext_objs} >>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>> +libiptext.so: initext.o ${libext_objs} >>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>> ${xt_connlabel_LIBADD}; >>> -libext_ebt.a: initextb.o ${libext_ebt_objs} >>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>> +libiptext_ebt.so: initextb.o ${libext_ebt_objs} >>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>> ${xt_connlabel_LIBADD}; >>> -libext_arpt.a: initexta.o ${libext_arpt_objs} >>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>> +libiptext_arpt.so: initexta.o ${libext_arpt_objs} >>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>> ${xt_connlabel_LIBADD}; >>> -libext4.a: initext4.o ${libext4_objs} >>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>> +libiptext4.so: initext4.o ${libext4_objs} >>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>> ${xt_connlabel_LIBADD}; >>> -libext6.a: initext6.o ${libext6_objs} >>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>> +libiptext6.so: initext6.o ${libext6_objs} >>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>> ${xt_connlabel_LIBADD}; >>> initext_func := $(addprefix xt_,${pfx_build_static}) >>> initextb_func := $(addprefix ebt_,${pfb_build_static}) >>
On Mon, Apr 30, 2018 at 7:58 AM, John Crispin <john@phrozen.org> wrote: > > > On 27/04/18 16:05, Alin Năstac wrote: >> >> According to "Automatic variables" chapter of make manual, $* expands >> to the pattern matched by % in an implicit rule. >> However, the make rules in which this patch use the $* variable is an >> explicit rule, hence $* expansion will be empty. >> >> >> On Fri, Apr 27, 2018 at 8:41 AM, John Crispin <john@phrozen.org> wrote: >>> >>> >>> On 24/04/18 10:05, Alin Nastac wrote: >>>> >>>> This fixes an iptables link error when kernel config include >>>> CONFIG_NETFILTER_XT_MATCH_STATISTIC=y >>>> related to the missing -lm argument on the linker command line. Error is >>>> caused by >>>> the odd looking linker argument ${$*_LIBADD} which get expanded to an >>>> empty string. >>> >>> >>> Hi, >>> the $* usage is correct >>> >>> src/%.c: >>> echo $* >>> >>> ->src/example (bei src/example.c) >>> >>> please provide your diffconfig so i can reproduce your issue locally. >>> >>> John >>> > > Hi, > please try not to top post. and see if this fixes your issue please. --> > > https://pastebin.com/qbMfwGer > > > John Your solution works and is indeed a better solution. Don't forget to replace all package/network/utils/iptables/patches/600-shared-libext.patch occurrences of the expression ${$*_LIBADD}. >>> >>> >>>> Signed-off-by: Alin Nastac <alin.nastac@gmail.com> >>>> --- >>>> package/network/utils/iptables/patches/600-shared-libext.patch | 10 >>>> +++++----- >>>> 1 file changed, 5 insertions(+), 5 deletions(-) >>>> >>>> diff --git >>>> a/package/network/utils/iptables/patches/600-shared-libext.patch >>>> b/package/network/utils/iptables/patches/600-shared-libext.patch >>>> index a906d40..17e7fbe 100644 >>>> --- a/package/network/utils/iptables/patches/600-shared-libext.patch >>>> +++ b/package/network/utils/iptables/patches/600-shared-libext.patch >>>> @@ -28,27 +28,27 @@ >>>> -libext.a: initext.o ${libext_objs} >>>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>>> +libiptext.so: initext.o ${libext_objs} >>>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>>> ${xt_connlabel_LIBADD}; >>>> -libext_ebt.a: initextb.o ${libext_ebt_objs} >>>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>>> +libiptext_ebt.so: initextb.o ${libext_ebt_objs} >>>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>>> ${xt_connlabel_LIBADD}; >>>> -libext_arpt.a: initexta.o ${libext_arpt_objs} >>>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>>> +libiptext_arpt.so: initexta.o ${libext_arpt_objs} >>>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>>> ${xt_connlabel_LIBADD}; >>>> -libext4.a: initext4.o ${libext4_objs} >>>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>>> +libiptext4.so: initext4.o ${libext4_objs} >>>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>>> ${xt_connlabel_LIBADD}; >>>> -libext6.a: initext6.o ${libext6_objs} >>>> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >>>> +libiptext6.so: initext6.o ${libext6_objs} >>>> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >>>> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o >>>> $@ >>>> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >>>> ${xt_connlabel_LIBADD}; >>>> initext_func := $(addprefix xt_,${pfx_build_static}) >>>> initextb_func := $(addprefix ebt_,${pfb_build_static}) >>> >>> >
diff --git a/package/network/utils/iptables/patches/600-shared-libext.patch b/package/network/utils/iptables/patches/600-shared-libext.patch index a906d40..17e7fbe 100644 --- a/package/network/utils/iptables/patches/600-shared-libext.patch +++ b/package/network/utils/iptables/patches/600-shared-libext.patch @@ -28,27 +28,27 @@ -libext.a: initext.o ${libext_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext.so: initext.o ${libext_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext_ebt.a: initextb.o ${libext_ebt_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext_ebt.so: initextb.o ${libext_ebt_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext_arpt.a: initexta.o ${libext_arpt_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext_arpt.so: initexta.o ${libext_arpt_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext4.a: initext4.o ${libext4_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext4.so: initext4.o ${libext4_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext6.a: initext6.o ${libext6_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext6.so: initext6.o ${libext6_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; initext_func := $(addprefix xt_,${pfx_build_static}) initextb_func := $(addprefix ebt_,${pfb_build_static})
This fixes an iptables link error when kernel config include CONFIG_NETFILTER_XT_MATCH_STATISTIC=y related to the missing -lm argument on the linker command line. Error is caused by the odd looking linker argument ${$*_LIBADD} which get expanded to an empty string. Signed-off-by: Alin Nastac <alin.nastac@gmail.com> --- package/network/utils/iptables/patches/600-shared-libext.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)