On Sat, 2022-11-19 at 01:57 +0000, Peter Kjellerstedt wrote: > > -----Original Message----- > > From: openembedded-core@lists.openembedded.org > > <openembedded-core@lists.openembedded.org> On Behalf Of Richard > > Purdie > > Sent: den 18 november 2022 17:36 > > To: Anton Antonov <anton.anto...@arm.com>; > > openembedded-core@lists.openembedded.org > > Subject: Re: [OE-core] [langdale][master][PATCH] rust: Do not use > > default compiler flags defined in CC crate > > > > On Fri, 2022-11-18 at 16:21 +0000, Anton Antonov wrote: > > > I’ve tested your approach. It doesn’t work for whatever reason. > > > CRATE_CC_NO_DEFAULTS is empty exported for native recipes: > > > > > > $ MACHINE=qemuarm bitbake rust-native -e |grep > > > CRATE_CC_NO_DEFAULTS > > > # $CRATE_CC_NO_DEFAULTS [3 operations] > > > # [export] "${'1' if d.getVar('CRATE_CC_NO_DEFAULTS') == > > > 'true' else '0'}" > > > export CRATE_CC_NO_DEFAULTS="" > > > # $CRATE_CC_NO_DEFAULTS:class-native > > > CRATE_CC_NO_DEFAULTS:class-native="" > > > > > > > > > I also tried: > > > CRATE_CC_NO_DEFAULTS[export] = > > > "${@oe.utils.conditional('CRATE_CC_NO_DEFAULTS', '', '0', '1', > > > d)}" > > > with the same result – empty export. > > > > I think it might need to be 0 or "" instead of '0'. It would be > > nice if > > we could make False work too but I worry that might not. > > > > Cheers, > > > > Richard > > None of this will work unless you change the code in > bitbake/lib/bb/data.py > to use d.getVarFlag(var, "export") instead of d.getVarFlag(var, > "export", False). > However, I assume that is not wanted given that support for > foo[unexport] = "1" > was introduced to counteract a foo[export] = "1".
Good point, which reminds me why the code does this. Expanding the value for all export variables would have a significant effect on some performance sensitive code :(. >From memory I think there was a bit more to unexport than that. Looking at the history: https://git.yoctoproject.org/poky/commit/?id=0da3c82a66e02bf2d3780e23427d476766a0bcfc I think it wasn't enough just to not export some things, we wanted to actually unset them in the shell environment. We may have later done more environment cleaning which made this unnecessary, less sure about that. I did remove a lot of the unexports (e.g. MACHINE and DISTRO) but SHELL[unexport] = "1" remains. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#173578): https://lists.openembedded.org/g/openembedded-core/message/173578 Mute This Topic: https://lists.openembedded.org/mt/95113030/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-