Patchwork [dylan,&,dora,&,master] image-mklibs: ensure sysroot is correctly set when calling gcc

login
register
mail settings
Submitter Nicolas Dechesne
Date Nov. 22, 2013, 10:39 p.m.
Message ID <1385159983-29270-1-git-send-email-nicolas.dechesne@linaro.org>
Download mbox | patch
Permalink /patch/62253/
State New
Headers show

Comments

Nicolas Dechesne - Nov. 22, 2013, 10:39 p.m.
[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

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
 meta/classes/image-mklibs.bbclass | 1 +
 1 file changed, 1 insertion(+)
Otavio Salvador - Nov. 23, 2013, 12:33 p.m.
On Fri, Nov 22, 2013 at 8:39 PM, Nicolas Dechesne
<nicolas.dechesne@linaro.org> wrote:
> [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
>
> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>

Nice; once this is merged this should be considered to Dora as well,
shouldn't it?
Otavio Salvador - Nov. 23, 2013, 12:33 p.m.
On Sat, Nov 23, 2013 at 10:33 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Fri, Nov 22, 2013 at 8:39 PM, Nicolas Dechesne
> <nicolas.dechesne@linaro.org> wrote:
>> [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
>>
>> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
>
> Nice; once this is merged this should be considered to Dora as well,
> shouldn't it?

Sorry, I didn't see the subject :-) perfect.

Patch

diff --git a/meta/classes/image-mklibs.bbclass b/meta/classes/image-mklibs.bbclass
index 66b0f52..beef1b4 100644
--- a/meta/classes/image-mklibs.bbclass
+++ b/meta/classes/image-mklibs.bbclass
@@ -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 \