Patchwork [3/3] cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correct

login
register
mail settings
Submitter Saul Wold
Date Sept. 10, 2013, 5:28 p.m.
Message ID <1378834095-8523-3-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/57789/
State Accepted
Commit 7d8b700242b1b32c6b6d0735b497701800f54fc4
Headers show

Comments

Saul Wold - Sept. 10, 2013, 5:28 p.m.
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>
---
 meta/classes/cmake.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 1e72371..30c1792 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} )