aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/xdp-tools/patches
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-07-06 22:20:25 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-07-06 22:38:20 +0100
commitd29722e6ff764d78428c54a5618b7a0e191245f1 (patch)
treef6cf711017d07fcdca8d1653bca7581c843a68ba /package/network/utils/xdp-tools/patches
parent8288a4bbb368fc050f46c7e97a1c1b7b0e0c66c2 (diff)
downloadupstream-d29722e6ff764d78428c54a5618b7a0e191245f1.tar.gz
upstream-d29722e6ff764d78428c54a5618b7a0e191245f1.tar.bz2
upstream-d29722e6ff764d78428c54a5618b7a0e191245f1.zip
xdp-tools: fix build with NLS enabled
Make sure the 'configure' shell script finds the libintl when linking the test programs for discovering libpcap and libbpf. Reported-by: @trippleflux Fixes: 6ad1bea2a603 ("xdp-tools: add package") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/utils/xdp-tools/patches')
-rw-r--r--package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
new file mode 100644
index 0000000000..b3454548f8
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
@@ -0,0 +1,29 @@
+--- a/configure
++++ b/configure
+@@ -138,7 +138,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+- libpcap_err=$($CC -o $TMPDIR/libpcaptest $TMPDIR/libpcaptest.c $LIBPCAP_CFLAGS $LIBPCAP_LDLIBS 2>&1)
++ libpcap_err=$($CC -o $TMPDIR/libpcaptest $TMPDIR/libpcaptest.c $LIBPCAP_CFLAGS $LIBPCAP_LDLIBS $LDFLAGS 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "HAVE_PCAP:=y" >>$CONFIG
+ [ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
+@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+- libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++ libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
+ echo "yes"
+@@ -253,7 +253,7 @@ int main(int argc, char **argv) {
+ }
+ EOF
+
+- libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++ libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "SYSTEM_LIBBPF:=y" >>$CONFIG
+ echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG