]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
cmake: remove CMAKE_SYSTEM_* from the native toolchain
authorRoss Burton <ross.burton@arm.com>
Mon, 21 Jul 2025 13:24:22 +0000 (14:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Jul 2025 21:59:39 +0000 (22:59 +0100)
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

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/cmake.bbclass

index 2c6d28b7a95a9173039101bfe92ce640359d333f..1488d744d40b607d39f3919f64e3b326f3e3bdec 100644 (file)
@@ -180,8 +180,6 @@ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${includedir})
 
 EOF
         cat > ${WORKDIR}/toolchain-native.cmake <<EOF
-set( CMAKE_SYSTEM_NAME ${@map_host_os_to_system_name(d.getVar('BUILD_OS'))} )
-set( CMAKE_SYSTEM_PROCESSOR ${@map_host_arch_to_uname_arch(d.getVar('BUILD_ARCH'))} )
 set( CMAKE_C_COMPILER ${OECMAKE_NATIVE_C_COMPILER} )
 set( CMAKE_CXX_COMPILER ${OECMAKE_NATIVE_CXX_COMPILER} )
 set( CMAKE_ASM_COMPILER ${OECMAKE_NATIVE_C_COMPILER} )