Skip to contentSkip to conversation

iptables: fix libpcap static linking

PATCH New Gustavo Zacarias 2 participants 2 messages Jan 6, 2016 – Feb 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iptables: fix libpcap static linking

libpcap can depend on other libraries like libusb and doesn't support pkgconfig, so add those libraries to LIBS when building statically. Fixes:
http://autobuild.buildroot.net/results/b4a/b4a3d00e9673a7aacc663c81de1d8e887a17951d/

---
 package/iptables/iptables.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/iptables/iptables.mk +5 -0
index 77a9fad..12e00f2 100644
@@ -38,6 +38,11 @@ endif
 
 # bpf compiler support and nfsynproxy tool
 ifeq ($(BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY),y)
+# libpcap is tricky for static-only builds and needs help
+ifeq ($(BR2_STATIC_LIBS),y)
+IPTABLES_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
+IPTABLES_CONF_OPTS += LIBS="$(IPTABLES_LIBS_FOR_STATIC_LINK)"
+endif
 IPTABLES_CONF_OPTS += --enable-bpf-compiler --enable-nfsynproxy
 IPTABLES_DEPENDENCIES += libpcap
 else
Signature · 1 line
2.4.10
#1 lore raw

PATCH 1/1 iptables: fix libpcap static linking

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

libpcap can depend on other libraries like libusb and doesn't support pkgconfig, so add those libraries to LIBS when building statically. Fixes:
http://autobuild.buildroot.net/results/b4a/b4a3d00e9673a7aacc663c81de1d8e887a17951d/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard