[openwrt/openwrt] build: add HOST_CXXFLAGS for host build

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 16 13:17:20 PST 2022


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/87d489f67a35968242cd4f192dc363dc87056844

commit 87d489f67a35968242cd4f192dc363dc87056844
Author: Sergey V. Lobanov <sergey at lobanov.in>
AuthorDate: Sat Jan 15 16:10:47 2022 +0300

    build: add HOST_CXXFLAGS for host build
    
    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 at lobanov.in>
---
 include/host-build.mk | 1 +
 rules.mk              | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/host-build.mk b/include/host-build.mk
index b68c8c4536..7f76eb1a2f 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -51,6 +51,7 @@ HOST_CONFIGURE_VARS = \
 	CFLAGS="$(HOST_CFLAGS)" \
 	CXX="$(HOSTCXX)" \
 	CPPFLAGS="$(HOST_CPPFLAGS)" \
+	CXXFLAGS="$(HOST_CXXFLAGS)" \
 	LDFLAGS="$(HOST_LDFLAGS)" \
 	CONFIG_SHELL="$(SHELL)"
 
diff --git a/rules.mk b/rules.mk
index 45b58614f1..57c3bca7d9 100644
--- 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)
 



More information about the lede-commits mailing list