image-mklibs: ensure sysroot is correctly set when calling gcc

[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)

(From OE-Core rev: 7275425524b8bb3d16d5c0c0a62aee5b08359ffd)

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>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nicolas Dechesne 2013-11-22 22:39:43 +00:00 committed by Richard Purdie
parent d8c8742e45
commit e8aa4b5784
1 changed files with 1 additions and 0 deletions

View 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 \