summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-07-25 16:26:40 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-07-25 16:26:40 +0200
commit43a2e623870e0b5c562794f632b3e27eaac5e900 (patch)
tree460cff49825da1d374c97ba3dd2befc769eaa2bd /package
parent53f8882d445b8ce3fc2745c10f90d30cbb1384ec (diff)
hostapd: fix libnl linking with BR2_PREFER_STATIC_LIB
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/hostapd/hostapd.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk
index f097e75e6..d733999dd 100644
--- a/package/hostapd/hostapd.mk
+++ b/package/hostapd/hostapd.mk
@@ -10,6 +10,13 @@ HOSTAPD_SUBDIR = hostapd
HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
HOSTAPD_DEPENDENCIES = libnl
+HOSTAPD_LDFLAGS = $(TARGET_LDFLAGS)
+
+# libnl needs -lm (for rint) if linking statically
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+HOSTAPD_LDFLAGS += -lm
+endif
+
define HOSTAPD_LIBNL_CONFIG
echo "CONFIG_LIBNL20=y" >>$(HOSTAPD_CONFIG)
endef
@@ -72,7 +79,7 @@ define HOSTAPD_CONFIGURE_CMDS
cp $(@D)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG)
$(SED) "s/\/local//" $(@D)/$(HOSTAPD_SUBDIR)/Makefile
echo "CFLAGS += $(TARGET_CFLAGS)" >>$(HOSTAPD_CONFIG)
- echo "LDFLAGS += $(TARGET_LDFLAGS)" >>$(HOSTAPD_CONFIG)
+ echo "LDFLAGS += $(HOSTAPD_LDFLAGS)" >>$(HOSTAPD_CONFIG)
echo "CC = $(TARGET_CC)" >>$(HOSTAPD_CONFIG)
# Drivers
$(SED) "s/^#CONFIG_DRIVER_WIRED/CONFIG_DRIVER_WIRED/" $(HOSTAPD_CONFIG)