summaryrefslogtreecommitdiffstats
path: root/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
blob: e2fbfa57dca4443cf7393813dd4e0f8f7028aba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/configure
+++ b/configure
@@ -174,7 +174,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
@@ -222,7 +222,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"
@@ -289,7 +289,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