build: use CXXFLAGS if defined

Instead of using TARGET_CFLAGS and EXTRA_CFLAGS in cmake and scons
build use the TARGET_CXXFLAGS and EXTRA_CXXFLAGS like it is done for
normal make and configure. configure used TARGET_CXXFLAGS and
EXTRA_CFLAGS for the CXXFLAGS. The package-default.mk sets
"EXTRA_CXXFLAGS = $(EXTRA_CFLAGS)" so using EXTRA_CXXFLAGS flags should
be save.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2016-10-03 01:21:13 +02:00 committed by Felix Fietkau
parent 5d04dcedb4
commit 559fb537d8
3 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ define Build/Configure/Default
mkdir -p $(CMAKE_BINARY_DIR) mkdir -p $(CMAKE_BINARY_DIR)
(cd $(CMAKE_BINARY_DIR); \ (cd $(CMAKE_BINARY_DIR); \
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
cmake \ cmake \
-DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_NAME=Linux \

View file

@ -97,7 +97,7 @@ CONFIGURE_ARGS = \
CONFIGURE_VARS = \ CONFIGURE_VARS = \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CFLAGS)" \ CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \

View file

@ -4,7 +4,7 @@ SCONS_VARS = \
CC="$(TARGET_CC_NOCACHE)" \ CC="$(TARGET_CC_NOCACHE)" \
CXX="$(TARGET_CXX_NOCACHE)" \ CXX="$(TARGET_CXX_NOCACHE)" \
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
DESTDIR="$(PKG_INSTALL_DIR)" DESTDIR="$(PKG_INSTALL_DIR)"