浏览代码

reaver: fix static link build issue

When libpcap itself is linked against other libraries, reaver fails to
build as it doesn't link with libpcap dependencies. This patch fixes
that by using the pcap-config program.

Fixes:

  http://autobuild.buildroot.net/results/899fd633288d5cd5aa221413cded857e4f743194/

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Guillaume W. Bres 7 年之前
父节点
当前提交
559416ffe2
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      package/reaver/reaver.mk

+ 6 - 0
package/reaver/reaver.mk

@@ -14,4 +14,10 @@ REAVER_LICENSE_FILES = docs/LICENSE
 REAVER_SUBDIR = src
 REAVER_SUBDIR = src
 REAVER_DEPENDENCIES = libpcap
 REAVER_DEPENDENCIES = libpcap
 
 
+ifeq ($(BR2_STATIC_LIBS),y)
+REAVER_CONF_ENV += \
+	LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" \
+	LDFLAGS="$(TARGET_LDFLAGS) `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
+endif
+
 $(eval $(autotools-package))
 $(eval $(autotools-package))