Skip to contentSkip to conversation

prebuilt toolchain versus --sysroot

DISCUSSION Elena Vengerova 2 participants 2 messages Mar 30, 2011

lore
Share & tools
lore
#0 lore raw

Hello,

I'm trying to use pre-built SDK. PATH, CPPFLAGS and LDFLAGS are correct. However configure of the first target package fails because compiler cannot find crt1.o. I've found out that it's due --sysroot that points to STAGING_DIR_TARGET.

Should I copy SDK libraries and headers to STAGING_DIR_TARGET or there is more correct option to resolve this issue?

Thanks,
Elena

#1 lore raw
Quoted 9 lines · Elena Vengerova

Hello,

I'm trying to use pre-built SDK. PATH, CPPFLAGS and LDFLAGS are correct. However configure of the first target package fails because compiler cannot find crt1.o. I've found out that it's due --sysroot that points to STAGING_DIR_TARGET.

Should I copy SDK libraries and headers to STAGING_DIR_TARGET or there is more correct option to resolve this issue?

Elena,

Pre-built SDKs (e.g. generated by OE from meta-toolchain) are usually meant to be used on their own, outside of the normal bitbake flow of OpenEmbedded.

Previously it was possible to still use them externally by setting TARGET_CPPFLAGS and TARGET_LDFLAGS, like you are saying. Unfortunately, with the mandated use of --sysroot in latest OE, all the toolchain components have to be inside our sysroot, which is STAGING_DIR...

Please check external-toolchain-csl.bb and external-toolchain-angstrom.bb recipes in recipes/meta/ directory for specific pointers on how to copy/stage the necessary objects, libraries and headers. Plus, installing/staging them properly also solves packaging and allows proper rootfs image generation with deployed libc packages from external toolchain.

Signature · 1 line
Denys