pciutils: Fix build with external toolchains
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 5 Jun 2017 20:48:45 +0000 (13:48 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Tue, 6 Jun 2017 00:18:51 +0000 (17:18 -0700)
Passing GNU_TARGET_NAME implies that we have a 4-group triplet (e.g:
arm-openwrt-unknown-linux), and this works fine with pciutils'
lib/configure operating system detection. If we have an external
toolchain (e.g: mipsel-linux-gnu), the configure script is all confused
and ends-up picking up i386-ports, which is not valid on the target
architecture.

Finally, we are not passing TARGET_CPPFLAGS as we should, so let's do
that correctly.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
utils/pciutils/Makefile

index 3f61b4450fd39f624d3ae33b6527258a76c88f21..c0010cf77b2269172ea3b278638c71ac5d4384ae 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
 PKG_VERSION:=3.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
@@ -45,9 +45,9 @@ exit 0
 endef
 
 MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
+       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
        PREFIX="/usr" \
-       HOST="$(GNU_TARGET_NAME)" \
+       HOST="Linux" \
        HWDB="no" \
        ZLIB="yes"