diff options
author | Ross Burton <ross.burton@arm.com> | 2025-07-21 14:24:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-21 23:00:18 +0100 |
commit | 208693b05c1032c412f7e4041cadf87a48e04821 (patch) | |
tree | 678be786c809747ce75642fd036006d8a911f548 | |
parent | 736521296cde96165c8849642bd15580447c5e89 (diff) | |
download | poky-208693b05c1032c412f7e4041cadf87a48e04821.tar.gz |
cmake: remove CMAKE_SYSTEM_* from the native toolchain
If these variables are set explictly then CMake assumes that it is
cross-compiling[1]. We don't need to set them as the default values as
detected by CMake are correct for native.
[1] https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html
(From OE-Core rev: 0ea50cba64b5004722051c0ece900443dc4ca929)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-recipe/cmake.bbclass | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass index 2c6d28b7a9..1488d744d4 100644 --- a/meta/classes-recipe/cmake.bbclass +++ b/meta/classes-recipe/cmake.bbclass | |||
@@ -180,8 +180,6 @@ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${includedir}) | |||
180 | 180 | ||
181 | EOF | 181 | EOF |
182 | cat > ${WORKDIR}/toolchain-native.cmake <<EOF | 182 | cat > ${WORKDIR}/toolchain-native.cmake <<EOF |
183 | set( CMAKE_SYSTEM_NAME ${@map_host_os_to_system_name(d.getVar('BUILD_OS'))} ) | ||
184 | set( CMAKE_SYSTEM_PROCESSOR ${@map_host_arch_to_uname_arch(d.getVar('BUILD_ARCH'))} ) | ||
185 | set( CMAKE_C_COMPILER ${OECMAKE_NATIVE_C_COMPILER} ) | 183 | set( CMAKE_C_COMPILER ${OECMAKE_NATIVE_C_COMPILER} ) |
186 | set( CMAKE_CXX_COMPILER ${OECMAKE_NATIVE_CXX_COMPILER} ) | 184 | set( CMAKE_CXX_COMPILER ${OECMAKE_NATIVE_CXX_COMPILER} ) |
187 | set( CMAKE_ASM_COMPILER ${OECMAKE_NATIVE_C_COMPILER} ) | 185 | set( CMAKE_ASM_COMPILER ${OECMAKE_NATIVE_C_COMPILER} ) |