Skip to content
Commit eb51e30e authored by Pascal Bach's avatar Pascal Bach Committed by Richard Purdie
Browse files

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: default avatarPascal Bach <pascal.bach@siemens.com>

(from http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154791.html

 )

Signed-off-by: default avatarMikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: default avatarPoonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: default avatarPoonam Jadhav <ppjadhav456@gmail.com>
parent 0bcf105e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment