From 140b3f2fe09ed12a6561697982189cf934fcbfd8 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 5 Jun 2017 17:44:27 -0700 Subject: [PATCH] lpeg: Fix build with external toolchains We are not properly passing down TARGET_CFLAGS and TARGET_CPPFLAGS and this can be noticed with external toolchains with the following build error: mipsel-linux-gnu-gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -O2 -std=c99 -I../lua/ -fPIC -c -o lpvm.o lpvm.c lpvm.c:10:17: fatal error: lua.h: No such file or directory #include "lua.h" ^ compilation terminated. make[4]: *** [lpvm.o] Error 1 Re-use COPT to pass our TARGET_CFLAGS and TARGET_CPPFLAGS Signed-off-by: Florian Fainelli --- lang/lpeg/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/lpeg/Makefile b/lang/lpeg/Makefile index ee8a4ef1fe..35f5aa673b 100644 --- a/lang/lpeg/Makefile +++ b/lang/lpeg/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lpeg PKG_VERSION:=0.12.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT @@ -38,7 +38,8 @@ define Build/Configure endef # add make variable overrides here -MAKE_FLAGS += +MAKE_FLAGS += \ + COPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -O2" define Package/lpeg/install $(INSTALL_DIR) $(1)/usr/lib/lua