[buildroot] do not pass optimization flags in HOST_CPPFLAGS (#12153)
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 9 Sep 2012 21:35:42 +0000 (21:35 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 9 Sep 2012 21:35:42 +0000 (21:35 +0000)
SVN-Revision: 33351

include/host-build.mk
rules.mk

index 40af5c87ccfa703d3030603f88a87b1d534744fd..c4fcf94f176e684cf432f9edb933585a64a2eb63 100644 (file)
@@ -47,7 +47,7 @@ endef
 HOST_CONFIGURE_VARS = \
        CC="$(HOSTCC)" \
        CFLAGS="$(HOST_CFLAGS)" \
-       CPPFLAGS="$(HOST_CFLAGS)" \
+       CPPFLAGS="$(HOST_CPPFLAGS)" \
        LDFLAGS="$(HOST_LDFLAGS)" \
        SHELL="$(BASH)"
 
index b7bad1ca54484a134379e684bb294d282e204273..995852e09bdbce3bb983f19c5726365c739c0003 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -173,7 +173,8 @@ PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
 export PKG_CONFIG
 
 HOSTCC:=gcc
-HOST_CFLAGS:=-O2 -I$(STAGING_DIR_HOST)/include
+HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include
+HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
 HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib
 
 TARGET_CC:=$(TARGET_CROSS)gcc