]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
cmake: add CMAKE_SYSROOT to generated toolchain file
authorPascal Bach <pascal.bach@siemens.com>
Fri, 21 Apr 2023 05:46:12 +0000 (11:16 +0530)
committerSteve Sakoman <steve@sakoman.com>
Fri, 28 Apr 2023 02:35:34 +0000 (16:35 -1000)
commit1105c67d554bcd155e8247cb16efc8d6a642444f
tree7ac96c20a5b7c67845e7785e578b297094b92522
parenta549319e5fdae685f93122627226f9b102307bc3
cmake: add CMAKE_SYSROOT to generated toolchain file

This already got fixed in the toolchain file that is used during development
in https://github.com/openembedded/openembedded-core/commit/cb42802f2fe1760f894a435b07286bca3a220364

The toolchain file generated by the cmake.bbclass however does not set
CMAKE_SYSROOT. Under certain circumstances this also leads to the error:
`"stdlib.h: No such file or directory #include_next <stdlib.h>"`
during the build of a recipe.

An example where this accured was during the upgrade of the Apache Thrift
recipe in meta-openembedded to 0.11.0. With this change the build works out of
the box.

CMAKE_SYSROOT must only be set when crosscompiling, otherwise it will interfere
with the native compiler headers.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
(from http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154791.html )

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/cmake.bbclass