All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] dhcpdump: fix static build
@ 2014-04-23 19:59 Baruch Siach
  2014-04-23 20:52 ` [Buildroot] About static linking Thomas Petazzoni
  2014-05-07 20:48 ` [Buildroot] [PATCH] dhcpdump: fix static build Peter Korsgaard
  0 siblings, 2 replies; 7+ messages in thread
From: Baruch Siach @ 2014-04-23 19:59 UTC (permalink / raw)
  To: buildroot

Use pcap-config to list optional libpcap dependencies that we need to list
when building statically.

Fixes:
http://autobuild.buildroot.net/results/110/1107c21cdf656763bf7048c6c5c7899369724f5f/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/dhcpdump/dhcpdump.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/dhcpdump/dhcpdump.mk b/package/dhcpdump/dhcpdump.mk
index cb2daa973177..ded7c295c3ae 100644
--- a/package/dhcpdump/dhcpdump.mk
+++ b/package/dhcpdump/dhcpdump.mk
@@ -10,8 +10,13 @@ DHCPDUMP_DEPENDENCIES = libpcap
 DHCPDUMP_LICENSE = BSD-2c
 DHCPDUMP_LICENSE_FILES = LICENSE
 
+DHCPDUMP_LIBS = -lpcap
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+DHCPDUMP_LIBS += $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)
+endif
+
 define DHCPDUMP_BUILD_CMDS
-	$(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)"
+	$(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" LIBS="$(DHCPDUMP_LIBS)"
 endef
 
 define DHCPDUMP_INSTALL_TARGET_CMDS
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-07 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 19:59 [Buildroot] [PATCH] dhcpdump: fix static build Baruch Siach
2014-04-23 20:52 ` [Buildroot] About static linking Thomas Petazzoni
2014-04-24  4:29   ` Baruch Siach
2014-04-24  7:16     ` Thomas Petazzoni
2014-04-24 15:23   ` Peter Korsgaard
2014-04-24 22:01     ` Arnout Vandecappelle
2014-05-07 20:48 ` [Buildroot] [PATCH] dhcpdump: fix static build Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.