]> code.ossystems Code Review - openembedded-core.git/commitdiff
image-mklibs: ensure sysroot is correctly set when calling gcc
authorNicolas Dechesne <nicolas.dechesne@linaro.org>
Fri, 22 Nov 2013 22:39:43 +0000 (22:39 +0000)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 11 Dec 2013 19:02:38 +0000 (19:02 +0000)
[YOCTO #2519]

When getting gcc from sstate, it is possible to get a gcc with a bogus
sysroot configuration, as discussed in [1] or in [YOCTO #2519].

mklibs script will eventually call gcc, so we need to make sure that it
provides gcc with the right sysroot location.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2013-September/084159.html

(From OE-Core master rev: 3a66dd762e493ad2cda57110be67c3b06628050a)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image-mklibs.bbclass

index 66b0f5251e2a4c70eb7b827b4cfcf33b42e5dfb7..beef1b41dafe5c289865bd8b1a56bf1bf2129b38 100644 (file)
@@ -40,6 +40,7 @@ mklibs_optimize_image_doit() {
                --ldlib ${dynamic_loader} \
                --libdir ${baselib} \
                --sysroot ${PKG_CONFIG_SYSROOT_DIR} \
+               --gcc-options "--sysroot=${PKG_CONFIG_SYSROOT_DIR}" \
                --root ${IMAGE_ROOTFS} \
                --target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \
                -d ${WORKDIR}/mklibs/dest \