ramips: fix two-way hash and auto ageout on MT7621
[openwrt/staging/jogo.git] / package / network / utils / iproute2 / patches / 002-tc-fix-xtables-incorrect-usage-of-LDFLAGS.patch
1 From 6ddb36c3a9686df1cca2f4d06518395f1eb9d5cc Mon Sep 17 00:00:00 2001
2 From: Syrone Wong <wong.syrone@gmail.com>
3 Date: Wed, 12 Dec 2018 19:35:08 +0800
4 Subject: [PATCH] tc: fix xtables incorrect usage of LDFLAGS
5
6 The incorrect setting of LDFLAGS causes error below:
7
8 > em_ipt.o: In function `em_ipt_print_epot':
9 > em_ipt.c:(.text.em_ipt_print_epot+0x2e): undefined reference to
10 > `xtables_init_all'
11
12 em_ipt.c gets involved when TC_CONFIG_XT=y, which requires xtables,
13 while tc/Makefile doesn't pass flags correctly. It adds '-lxtables'
14 to LDFLAGS instead of LDLIBS.
15
16 Fixes: dd296215 ("tc: add em_ipt ematch for calling xtables matches from tc matching context")
17
18 Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
19 Acked-by: Eyal Birger <eyal.birger@gmail.com>
20 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
21 ---
22 tc/Makefile | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 --- a/tc/Makefile
26 +++ b/tc/Makefile
27 @@ -170,7 +170,7 @@ em_ipset.o: CFLAGS += $$($(PKG_CONFIG) x
28 em_ipt.o: CFLAGS += $$($(PKG_CONFIG) xtables --cflags)
29
30 ifeq ($(TC_CONFIG_XT),y)
31 - LDFLAGS += $$($(PKG_CONFIG) xtables --libs)
32 + LDLIBS += $$($(PKG_CONFIG) xtables --libs)
33 endif
34
35 %.yacc.c: %.y