From mboxrd@z Thu Jan 1 00:00:00 1970 From: Syrone Wong Subject: [iproute2-next] tc: fix xtables incorrect usage of LDFLAGS Date: Wed, 12 Dec 2018 19:35:08 +0800 Message-ID: <20181212113508.5089-1-wong.syrone@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: eyal.birger@gmail.com, Syrone Wong To: netdev@vger.kernel.org Return-path: Received: from mail-pl1-f196.google.com ([209.85.214.196]:45565 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbeLLLfW (ORCPT ); Wed, 12 Dec 2018 06:35:22 -0500 Received: by mail-pl1-f196.google.com with SMTP id a14so8478521plm.12 for ; Wed, 12 Dec 2018 03:35:22 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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 --- tc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/Makefile b/tc/Makefile index f8010d3c..2edaf2c8 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 -- 2.20.0