packages: Prepend kernel headers in include search path stbgcc
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 6 Mar 2017 00:01:29 +0000 (16:01 -0800)
committerFlorian Fainelli <f.fainelli@gmail.com>
Sun, 19 Mar 2017 04:42:46 +0000 (21:42 -0700)
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
package/libs/libnl/Makefile
package/network/services/dnsmasq/Makefile
package/network/utils/umbim/Makefile
package/network/utils/wpan-tools/Makefile
package/utils/spidev_test/Makefile

index 7916556c00ef412c80065cbd6f41bb831f6d7fb6..6a61dc7c324743d0c3ffc878a32829d23429c079 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=0beb593dc6abfffa18a5c787b27884979c1b7e7f1fd468c801e3cc938a685922
 PKG_LICENSE:=LGPL-2.1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
 
 define Package/libnl/default
   SECTION:=libs
@@ -76,6 +77,7 @@ define Package/libnl/description
 endef
 
 TARGET_CFLAGS += -ffunction-sections $(FPIC)
+TARGET_CPPFLAGS += -I$(LINUX_DIR)/user_headers/include
 
 define Build/Compile
        $(call Build/Compile/Default)
index f4f21044eac868d6b6d7e52cbce2644e7f141458..860851af155bf55ced0e5877c7937b6318e4e2bd 100644 (file)
@@ -57,7 +57,8 @@ $(call Package/dnsmasq/Default)
   TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset, Conntrack, NO_ID enabled by default)
   DEPENDS:=+PACKAGE_dnsmasq_full_dnssec:libnettle \
        +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset \
-       +PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack
+       +PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack \
+       +libmnl
   VARIANT:=full
 endef
 
@@ -116,6 +117,10 @@ Package/dnsmasq-full/conffiles = $(Package/dnsmasq/conffiles)
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections
 
+ifeq ($(CONFIG_PACKAGE_dnsmasq_full_conntrack),y)
+TARGET_LDFLAGS += -lmnl
+endif
+
 COPTS = $(if $(CONFIG_IPV6),,-DNO_IPV6)
 
 ifeq ($(BUILD_VARIANT),nodhcpv6)
index 616a02367c7aed8b2a8acc9339e5fa3d438f652a..580215bb18fe9a96da9afd47134f1b91d34ada46 100644 (file)
@@ -19,6 +19,7 @@ PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/kernel.mk
 
 define Package/umbim
   SECTION:=net
@@ -33,7 +34,8 @@ define Package/umbim/description
 endef
 
 TARGET_CFLAGS += \
-       -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections
+       -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections \
+       -I$(LINUX_DIR)/user_headers/include
 
 TARGET_LDFLAGS += -Wl,--gc-sections
 
index ff65375724eee9de40f3072732976b85d8b3d81f..d143580420c901e710fee0f7af579600fb9c8459 100644 (file)
@@ -24,6 +24,8 @@ define Package/wpan-tools
   DEPENDS:= +libnl
 endef
 
+TARGET_CPPFLAGS+=-I$(LINUX_DIR)/user_headers/
+
 define Build/Configure
   $(call Build/Configure/Default)
 endef
index b7c5227f91da22b220dc84154ab9ba20dd80cb07..0c1b7083cdc40c98a068fffa1b0f62efa1cdce84 100644 (file)
@@ -27,6 +27,8 @@ define Package/spidev-test/description
   SPI testing utility.
 endef
 
+TARGET_CFLAGS+=-I$(LINUX_DIR)/user_headers/include
+
 define Build/Compile
        $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/spidev_test \
                $(PKG_BUILD_DIR)/spidev_test.c