From 6d922da9b856197671e74a87ab7d3d1a035fe1fa Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 28 Oct 2021 10:14:19 +0200 Subject: [PATCH] backports: add iproute2 compile fix Signed-off-by: John Crispin --- ...ute2-m_xt.so-depends-on-dynsyms.list.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 backports/0030-iproute2-m_xt.so-depends-on-dynsyms.list.patch diff --git a/backports/0030-iproute2-m_xt.so-depends-on-dynsyms.list.patch b/backports/0030-iproute2-m_xt.so-depends-on-dynsyms.list.patch new file mode 100644 index 000000000..2f0fc57ea --- /dev/null +++ b/backports/0030-iproute2-m_xt.so-depends-on-dynsyms.list.patch @@ -0,0 +1,47 @@ +From 4b2e6bb352b400e244646a7bc59bc5ca3ca6f5df Mon Sep 17 00:00:00 2001 +From: Roman Yeryomin +Date: Fri, 3 Sep 2021 17:31:11 +0300 +Subject: [PATCH 32/32] iproute2: m_xt.so depends on dynsyms.list + +When doing parallel build on a fast machine with bottleneck in i/o, +m_xt.so may start linking faster than dynsyms.list gets populated, +resulting in error: + +ld:dynsyms.list:0: syntax error in dynamic list + +Fix this by adding dynsyms.list as make dependency to m_xt.so +Described also here: +https://bugs.openwrt.org/index.php?do=details&task_id=3353 + +Change from v1: +- add dynsysms.list dependancy only when shared libs are enabled + +Signed-off-by: Roman Yeryomin +Fixes: FS#3353 +--- + .../utils/iproute2/patches/175-reduce-dynamic-syms.patch | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch +index da961a183b..c3892e5a0e 100644 +--- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch ++++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch +@@ -26,13 +26,14 @@ + + q_atm.so: q_atm.c + $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm +-@@ -205,4 +206,15 @@ static-syms.h: $(wildcard *.c) ++@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c) + sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ + done > $@ + + +else + + + +tc: dynsyms.list +++m_xt.so: dynsyms.list + +dynsyms.list: $(wildcard *.c) + + files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \ + + echo "{" > $@ ; \ +-- +2.25.1 +