btrfs-progs: Fix build with external toolchains
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 17 Jun 2017 03:06:20 +0000 (20:06 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Sat, 17 Jun 2017 03:47:03 +0000 (20:47 -0700)
TARGET_CPPFLAGS were not propagated correctly leading to these kinds of
build failure:

btrfstune.c:26:23: fatal error: uuid/uuid.h: No such file or directory
 #include <uuid/uuid.h>
                       ^
compilation terminated.
btrfs-find-root.c:24:18: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
                  ^
compilation terminated.
mkfs/common.c:18:23: fatal error: uuid/uuid.h: No such file or directory
 #include <uuid/uuid.h>

Fix that by passing TARGET_CPPFLAGS via EXTRA_CFLAGS

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

index 651852ece949f3743e9cbae34e42d879f92053e0..a8b1e586da6d5de2eedf8f7a4a83bdbcf5de8718 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
 PKG_VERSION:=4.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs/
@@ -53,6 +53,8 @@ CONFIGURE_ARGS += \
        --disable-convert \
        --disable-documentation
 
+EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
+
 define Package/btrfs-progs/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib