| Summary: |
cmake.bbclass sets invalid sysroot for native recipes |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
Paul Eggleton <bluelightning> |
| Component: |
devtools / tool chain | Assignee: |
Nitin Kamble <nitin.a.kamble> |
| Status: |
RESOLVED
DUPLICATE
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
Medium
|
CC: |
jessica.zhang, liezhi.yang, meta.mr.watcher, meta.watcher, sgw, stephan.binner
|
| Version: |
unspecified | |
|
| Target Milestone: |
1.2 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
---
|
cmake.bbclass sets OECMAKE_C_FLAGS and OECMAKE_C_FLAGS to include ${TOOLCHAIN_OPTIONS}, and TOOLCHAIN_OPTIONS is set to "--sysroot=${STAGING_DIR_TARGET}"; however for a native recipe STAGING_DIR_TARGET is not valid and is in fact empty, so the option passed to the compiler is "--sysroot=" which causes builds to fail due to not being able to find standard headers. Clearing TOOLCHAIN_OPTIONS within the recipe works, however ideally this would be handled within the cmake recipe (in a way that does not break non-native builds).