From: Syrone Wong Date: Wed, 12 Dec 2018 11:35:08 +0000 (+0800) Subject: tc: fix xtables incorrect usage of LDFLAGS X-Git-Tag: v4.20.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ddb36c3a9686df1cca2f4d06518395f1eb9d5cc;p=thirdparty%2Fiproute2.git tc: fix xtables incorrect usage of LDFLAGS The incorrect setting of LDFLAGS causes error below: > em_ipt.o: In function `em_ipt_print_epot': > em_ipt.c:(.text.em_ipt_print_epot+0x2e): undefined reference to > `xtables_init_all' em_ipt.c gets involved when TC_CONFIG_XT=y, which requires xtables, while tc/Makefile doesn't pass flags correctly. It adds '-lxtables' to LDFLAGS instead of LDLIBS. Fixes: dd296215 ("tc: add em_ipt ematch for calling xtables matches from tc matching context") Signed-off-by: Syrone Wong Acked-by: Eyal Birger Signed-off-by: Stephen Hemminger --- diff --git a/tc/Makefile b/tc/Makefile index f8010d3c0..2edaf2c88 100644 --- a/tc/Makefile +++ b/tc/Makefile @@ -171,7 +171,7 @@ em_ipset.o: CFLAGS += $$($(PKG_CONFIG) xtables --cflags) em_ipt.o: CFLAGS += $$($(PKG_CONFIG) xtables --cflags) ifeq ($(TC_CONFIG_XT),y) - LDFLAGS += $$($(PKG_CONFIG) xtables --libs) + LDLIBS += $$($(PKG_CONFIG) xtables --libs) endif %.yacc.c: %.y