On Tue, Jun 8, 2021 at 12:02 AM Phil Blundell via lists.openembedded.org <[email protected]> wrote: > > Wouldn't it be easier to just force -fPIE on for those users for whom this is > a problem? Or force -fPIE off for native everywhere. I'm not sure that doing > something based on GCC version is obviously the right plan. > > p. >
I was exactly wondering about distro/include/uninative-flags.inc which at the time was supposed to fix the changes btw ubuntu 16.x and 18.x. But this doesn't seem included nowhere. A.A. > > On 7 June 2021 22:25:58 BST, [email protected] wrote: >> >> By having multiple uninative feeds based on host gcc version (rather than a >> single uninative feed for all possible host gcc versions), we avoid a general >> class of problems (as first observed in the bug below) where changes in >> native >> gcc don't cause native sstate to regenerate. Below is another example where >> this problem is encountered across multiple supported host distros for a >> given >> poky version. >> >> gcc 6 supports default generation of PIE, which gets enabled between Ubuntu >> 16.04 (default gcc 5.4) and 18.04 (default gcc 7.5), both supported distros >> of warrior. Consider a native package dependency chain as follows: >> >> A >> / | \ >> B C D >> >> If a complete set of native sstate for the above packages is built prior >> to the default PIE change, but a workstation upgrades its distro to a version >> that natively compiles PIE by default, the sstate hash is not currently >> tainted, >> so the newer compiler version will pull from sstate not compiled for PIE. >> >> For example, if a source change to C causes part of the above chain to >> rebuild >> (C -> A), then this may result in non-PIE sstate (B and D) giving link errors >> with A. >> >> ld: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when >> making a PIE object; recompile with -fPIC >> ld: final link failed: Nonrepresentable section on output >> >> This appears to have been considered previously as an option to address >> the following bug, but appears to have been set aside only because of >> proximity to the end of a release cycle. >> >> [YOCTO #10441] >> >> Signed-off-by: Kyle Russell <[email protected]> >> ________________________________ >> meta/lib/oe/utils.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py >> index a84039f585..8afe19fd99 100644 >> --- a/meta/lib/oe/utils.py >> +++ b/meta/lib/oe/utils.py >> @@ -426,7 +426,7 @@ def host_gcc_version(d, taskcontextonly=False): >> bb.fatal("Can't get compiler version from %s --version output" % >> compiler) >> >> version = match.group(1) >> - return "-%s" % version if version in ("4.8", "4.9") else "" >> + return "-%s" % version >> >> >> def get_multilib_datastore(variant, d): > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#152771): https://lists.openembedded.org/g/openembedded-core/message/152771 Mute This Topic: https://lists.openembedded.org/mt/83381901/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
