]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correct
authorSaul Wold <sgw@linux.intel.com>
Tue, 10 Sep 2013 17:28:15 +0000 (10:28 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 10 Sep 2013 21:55:50 +0000 (22:55 +0100)
Using TARGET_OS can add the ABIEXTENSION so ensure that is is removed for the Linux
TARGET_OS, we might have other TARGET_OSes so don't hard code CMAKE_SYSTEM_NAME

[YOCTO #5145]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cmake.bbclass

index 1e72371e7603762bd0592553d958e6bafb809978..30c1792ffa68a2cb8a98d6845c4bf049c056417b 100644 (file)
@@ -35,7 +35,7 @@ cmake_do_generate_toolchain_file() {
        cat > ${WORKDIR}/toolchain.cmake <<EOF
 # CMake system name must be something like "Linux".
 # This is important for cross-compiling.
-set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed 's/^./\u&/'` )
+set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
 set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
 set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
 set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )