All of lore.kernel.org
 help / color / mirror / Atom feed
From: bkylerussell@gmail.com
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: OE-core <openembedded-core@lists.openembedded.org>,
	 Wes Lindauer <wesley.lindauer@gmail.com>
Subject: Re: [OE-core] [PATCH] lib: oe: utils: always append host gcc version to NATIVELSBSTRING
Date: Tue, 8 Jun 2021 12:41:07 -0400	[thread overview]
Message-ID: <CAFrQVPMBdhnOMEg+xa5gXrOnutdwiGjid09urwKstx+kQZK6-g@mail.gmail.com> (raw)
In-Reply-To: <038c3cc612569f32f6b837ca389abad930fd76e5.camel@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]

On Tue, Jun 8, 2021 at 7:16 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> > > There were specific issues with gcc 4.8 and 4.9 which required
> separate sstate. Do we
> > > know which gcc version switched the default and can we force older
> gcc's to use the
> > > same default or does it not work? I'm wondering if we could split off
> a "nopic" verison
> > > of sstate for example for the older gccs?
> > >
> > gcc 6 introduced an --enable-default-pie configure option, but I'm not
> exactly sure where
> > between Ubuntu 16.04 and Ubuntu 18.04 they picked that configure option
> up.  Since packages
> > based on the older gcc already exist in sstate, I think we would have to
> force the newer
> > behavior on each affected package.
> >
> > I realize we can just swizzle the compiler flags on the affected
> packages to make things happy,
> > but it seemed like this approach had at least been considered before, so
> I thought I would at least
> > get some feedback.
>
> As Andrea points out, we did fix this with a global include file which
> should have
> handled the issue. Are you using a release which doesn't have that or not
> using
> the include through your own custom distro?
>

Yes indeed, nice find.  bitbake -e confirms I'm including
uninative-flags.inc.  I do think this is exactly the
same issue, but there's a different set of dependencies involved in my
chain.  As someone suggested earlier,
I can force -fPIE on the packages where this is a problem, so I could of
course do something similar for those
packages.

But I still feel like there's an underlying uninative limitation that's not
being addressed, or highlighted.  For example,
the SSTATE_MIRRORS documentation seems to imply that differentiating
between uninative based on native gcc
version is the normal/correct behavior, even though it's clear to me now
that the example was chosen specifically
for the 4.8/4.9 issue, not just the general case.

"When pointing to sstate build artifacts on another machine that uses a
different GCC version for native builds,
you must configure SSTATE_MIRROR with a regular expression that maps local
search paths to server paths.
The paths need to take into account NATIVELSBSTRING set by the uninative
class."
 -
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-SSTATE_MIRRORS

But I suppose even similar versions of gcc across different supported
distros could be configured differently.
For example, warrior claims support for Ubuntu 16.04, 18.04, and Fedora 28,
but only Ubuntu 18.04 seems to
use --enable-default-pie based on gcc -v.  (Even newer Fedoras seem to not
use this flag.)

I guess we could have a "nopic" split like you suggested.  Or maybe
uninative itself should be hashed against
the native gcc configure args and version, since version by itself also
doesn't seem to be sufficient based on the
Fedora example above.  Neither one of those sounds particularly appealing
the more I think about it, so maybe
I'll just opt for fixing the packages like we've done for binutils-native.

[-- Attachment #2: Type: text/html, Size: 4289 bytes --]

  reply	other threads:[~2021-06-08 16:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 21:25 [PATCH] lib: oe: utils: always append host gcc version to NATIVELSBSTRING bkylerussell
2021-06-07 21:43 ` [OE-core] " Richard Purdie
2021-06-07 22:49   ` bkylerussell
2021-06-08 11:16     ` Richard Purdie
2021-06-08 16:41       ` bkylerussell [this message]
2021-06-07 22:01 ` Phil Blundell
2021-06-08  9:20   ` Andrea Adami
2021-06-08  9:48     ` Richard Purdie
2021-06-08 10:04       ` Andrea Adami

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFrQVPMBdhnOMEg+xa5gXrOnutdwiGjid09urwKstx+kQZK6-g@mail.gmail.com \
    --to=bkylerussell@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=wesley.lindauer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.