build: add HOST_CXXFLAGS for host build
authorSergey V. Lobanov <sergey@lobanov.in>
Sat, 15 Jan 2022 13:10:47 +0000 (16:10 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 16 Jan 2022 21:13:46 +0000 (22:13 +0100)
Added HOST_CXXFLAGS to specify CXXFLAGS during host-compile
(e.g. to specify c++ standard: HOST_CXXFLAGS += -std=c++11)

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
include/host-build.mk
rules.mk

index b68c8c45368ea05f547e3114dc91b12ea22286bb..7f76eb1a2f5f6978340cd075382209b9c71a3e46 100644 (file)
@@ -51,6 +51,7 @@ HOST_CONFIGURE_VARS = \
        CFLAGS="$(HOST_CFLAGS)" \
        CXX="$(HOSTCXX)" \
        CPPFLAGS="$(HOST_CPPFLAGS)" \
+       CXXFLAGS="$(HOST_CXXFLAGS)" \
        LDFLAGS="$(HOST_LDFLAGS)" \
        CONFIG_SHELL="$(SHELL)"
 
index 45b58614f1f5fb42c56d587e6daf85072054e124..57c3bca7d98c2448a80d467b6ead5cb62dd8de5a 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -240,6 +240,7 @@ export PKG_CONFIG
 HOSTCC:=gcc
 HOSTCXX:=g++
 HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include)
+HOST_CXXFLAGS:=
 HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
 HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR_HOSTPKG)/lib -L$(STAGING_DIR)/host/lib)