aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2014-01-08 17:23:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-08 17:25:52 +0000
commit5dc70fe4adfbc21426c461971e5a252233a015ba (patch)
treed8b398a7963439e182041c97d38fb79d65182529
parent8a414086c04acb1c9387567a49f05577fa0d66ba (diff)
downloadopenembedded-core-5dc70fe4adfbc21426c461971e5a252233a015ba.zip
openembedded-core-5dc70fe4adfbc21426c461971e5a252233a015ba.tar.gz
openembedded-core-5dc70fe4adfbc21426c461971e5a252233a015ba.tar.bz2
cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correct
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] (From OE-Core master rev: 7d8b700242b1b32c6b6d0735b497701800f54fc4) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/cmake.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 4ef9fca..5144cdf 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -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} )