haproxy: Pass down TARGET_CPPFLAGS for lua build
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 2 Apr 2017 21:17:33 +0000 (14:17 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Sun, 2 Apr 2017 21:17:33 +0000 (14:17 -0700)
Some external toolchaind don't automatically search for headers in
$(STAGING_DIR), make sure we do pass TARGET_CPPFLAGS as appropriate.
This fixes build errors such as:

mipsel-linux-gnu-gcc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX
-c -o lua.o lua.c
lua.c:80:31: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
                               ^
compilation terminated.
<builtin>: recipe for target 'lua.o' failed
make[6]: *** [lua.o] Error 1

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

index d8bd4b9f7eb92a9c69e3d1d611b7fd8dbbdf21ed..86423da66e25a6770606e46e42b0fe5d21732420 100644 (file)
@@ -111,6 +111,7 @@ define Build/Compile
        $(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR)/lua \
                INSTALL_TOP="$(STAGING_DIR)/lua-5.3.3/" \
                CC="$(TARGET_CC)" \
+               CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
                LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lreadline" \
                LD="$(TARGET_LD)" \
                linux install