Skip to contentSkip to conversation

cmake.bbclass: add CMAKE_SYSTEM_PROCESSOR into generated toolchain file

PATCH In review David Kozub 2 participants 2 messages Jul 27, 2010 – Jul 29, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 cmake.bbclass: add CMAKE_SYSTEM_PROCESSOR into generated toolchain file

Needed for packages that check this value, e.g. recent webkit.

---
 classes/cmake.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
classes/cmake.bbclass +1 -0
index 2376012..32ada35 100644
@@ -28,6 +28,7 @@ cmake_do_generate_toolchain_file() {
 # CMake system name must be something like "Linux".
 # This is important for cross-compiling.
   echo "set( CMAKE_SYSTEM_NAME" `echo ${SDK_OS} | sed 's/^./\u&/'` ")" > ${WORKDIR}/toolchain.cmake
+  echo "set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )" >> ${WORKDIR}/toolchain.cmake
   echo "set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )" >> ${WORKDIR}/toolchain.cmake
   echo "set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )" >> ${WORKDIR}/toolchain.cmake
   echo "set( CMAKE_C_FLAGS \"${OECMAKE_C_FLAGS}\" CACHE STRING \"OpenEmbedded CFLAGS\" )" >> ${WORKDIR}/toolchain.cmake
Signature · 1 line
1.7.1
#1 lore raw
Quoted 14 lines · David Kozub

Needed for packages that check this value, e.g. recent webkit.

---
 classes/cmake.bbclass |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
classes/cmake.bbclass +0 -0
index 2376012..32ada35 100644
@@ -28,6 +28,7 @@ cmake_do_generate_toolchain_file() {
  # CMake system name must be something like "Linux".
  # This is important for cross-compiling.
Quoted 5 lines

  echo "set( CMAKE_SYSTEM_NAME" echo ${SDK_OS} | sed 's/^./\u&/' ")" > ${WORKDIR}/toolchain.cmake
+  echo "set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )" >> ${WORKDIR}/toolchain.cmake
  echo "set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )" >> ${WORKDIR}/toolchain.cmake
  echo "set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )" >> ${WORKDIR}/toolchain.cmake
  echo "set( CMAKE_C_FLAGS \"${OECMAKE_C_FLAGS}\" CACHE STRING \"OpenEmbedded CFLAGS\" )" >> ${WORKDIR}/toolchain.cmake

This is really necessary, check the last comment on CMake bug #9065
(http://public.kitware.com/Bug/view.php?id=9065).

IMHO It could go together with the CMake 2.8.2 patches.

Best regards, Etrunko.

Quoted 9 lines

--
1.7.1

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 2 lines
Eduardo de Barros Lima
[email protected]