aboutsummaryrefslogtreecommitdiffstats
path: root/include/cmake.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/cmake.mk')
-rw-r--r--include/cmake.mk18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/cmake.mk b/include/cmake.mk
index 2cc10301aa..0a20530a16 100644
--- a/include/cmake.mk
+++ b/include/cmake.mk
@@ -23,12 +23,22 @@ ifeq ($(CONFIG_CCACHE),)
CMAKE_CXX_COMPILER:=$(call cmake_tool,$(TARGET_CXX))
CMAKE_C_COMPILER_ARG1:=
CMAKE_CXX_COMPILER_ARG1:=
+
+ CMAKE_HOST_C_COMPILER:=$(HOSTCC)
+ CMAKE_HOST_CXX_COMPILER:=$(HOSTCXX)
+ CMAKE_HOST_C_COMPILER_ARG1:=
+ CMAKE_HOST_CXX_COMPILER_ARG1:=
else
CCACHE:=$(STAGING_DIR_HOST)/bin/ccache
CMAKE_C_COMPILER:=$(CCACHE)
CMAKE_C_COMPILER_ARG1:=$(TARGET_CC_NOCACHE)
CMAKE_CXX_COMPILER:=$(CCACHE)
CMAKE_CXX_COMPILER_ARG1:=$(TARGET_CXX_NOCACHE)
+
+ CMAKE_HOST_C_COMPILER:=$(CCACHE)
+ CMAKE_HOST_C_COMPILER_ARG1:=$(HOSTCC_NOCACHE)
+ CMAKE_HOST_CXX_COMPILER:=$(CCACHE)
+ CMAKE_HOST_CXX_COMPILER_ARG1:=$(HOSTCXX_NOCACHE)
endif
CMAKE_AR:=$(call cmake_tool,$(TARGET_AR))
CMAKE_NM:=$(call cmake_tool,$(TARGET_NM))
@@ -97,8 +107,12 @@ define Host/Configure/Default
LDFLAGS="$(HOST_LDFLAGS)" \
cmake \
-DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_C_COMPILER="$(HOSTCC)" \
- -DCMAKE_CXX_COMPILER="$(HOSTCXX)" \
+ -DCMAKE_C_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
+ -DCMAKE_C_COMPILER_ARG1="$(CMAKE_HOST_C_COMPILER_ARG1)" \
+ -DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" \
+ -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_HOST_CXX_COMPILER_ARG1)" \
+ -DCMAKE_ASM_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
+ -DCMAKE_ASM_COMPILER_ARG1="$(CMAKE_HOST_C_COMPILER_ARG1)" \
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \