[OE-core] [PATCHv2] gcc-cross: remove --with-linker-hash-style

Christopher Larson kergoth at gmail.com
Fri Jul 1 21:27:50 UTC 2016


On Fri, Jul 1, 2016 at 2:19 PM, Khem Raj <raj.khem at gmail.com> wrote:

> On Fri, Jul 1, 2016 at 1:44 PM, Christopher Larson <kergoth at gmail.com>
> wrote:
> > From: Christopher Larson <chris_larson at mentor.com>
> >
> > We explicitly set the hash style to gnu in our LDFLAGS. Setting the
> default to
> > this in the toolchain, while convenient, actually hides bugs, as a
> failure to
> > obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how
> we
> > poison the sysroot -- rather than relying on the default, notice right
> away if
> > somoeone isn't obeying the needed flags.
> >
> > This will result in a failure to obey LDFLAGS causing a GNU_HASH QA
> failure,
> > which is what's often seen with external toolchains. This brings us all
> on the
> > same page, and makes sure a failure to obey LDFLAGS is seen early.
> >
> > This is limited to cross, to retain ease of use for SDKs.
> >
> > Signed-off-by: Christopher Larson <chris_larson at mentor.com>
> > ---
> >  meta/recipes-devtools/gcc/gcc-4.9.inc   | 3 ++-
> >  meta/recipes-devtools/gcc/gcc-5.3.inc   | 3 ++-
> >  meta/recipes-devtools/gcc/gcc-6.1.inc   | 3 ++-
> >  meta/recipes-devtools/gcc/gcc-cross.inc | 1 +
> >  4 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc
> b/meta/recipes-devtools/gcc/gcc-4.9.inc
> > index 64701c8..05e02d9 100644
> > --- a/meta/recipes-devtools/gcc/gcc-4.9.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-4.9.inc
> > @@ -107,13 +107,14 @@ JAVA = ""
> >
> >  LTO = "--enable-lto"
> >
> > +OECONF_HASH_STYLE = "--with-linker-hash-style=${LINKER_HASH_STYLE}"
> >  EXTRA_OECONF_BASE = "\
> >      ${LTO} \
> > +    ${OECONF_HASH_STYLE} \
> >      --enable-libssp \
> >      --disable-bootstrap \
> >      --disable-libmudflap \
> >      --with-system-zlib \
> > -    --with-linker-hash-style=${LINKER_HASH_STYLE} \
> >      --enable-linker-build-id \
> >      --with-ppl=no \
> >      --with-cloog=no \
> > diff --git a/meta/recipes-devtools/gcc/gcc-5.3.inc
> b/meta/recipes-devtools/gcc/gcc-5.3.inc
> > index 8613a10..faa1292 100644
> > --- a/meta/recipes-devtools/gcc/gcc-5.3.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-5.3.inc
> > @@ -113,14 +113,15 @@ JAVA = ""
> >
> >  LTO = "--enable-lto"
> >
> > +OECONF_HASH_STYLE = "--with-linker-hash-style=${LINKER_HASH_STYLE}"
> >  EXTRA_OECONF_BASE = "\
> >      ${LTO} \
> > +    ${OECONF_HASH_STYLE} \
> >      --enable-libssp \
> >      --enable-libitm \
> >      --disable-bootstrap \
> >      --disable-libmudflap \
> >      --with-system-zlib \
> > -    --with-linker-hash-style=${LINKER_HASH_STYLE} \
> >      --enable-linker-build-id \
> >      --with-ppl=no \
> >      --with-cloog=no \
> > diff --git a/meta/recipes-devtools/gcc/gcc-6.1.inc
> b/meta/recipes-devtools/gcc/gcc-6.1.inc
> > index 1a00f3f..e3ff9cb 100644
> > --- a/meta/recipes-devtools/gcc/gcc-6.1.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-6.1.inc
> > @@ -93,14 +93,15 @@ JAVA = ""
> >
> >  LTO = "--enable-lto"
> >
> > +OECONF_HASH_STYLE = "--with-linker-hash-style=${LINKER_HASH_STYLE}"
> >  EXTRA_OECONF_BASE = "\
> >      ${LTO} \
> > +    ${OECONF_HASH_STYLE} \
> >      --enable-libssp \
> >      --enable-libitm \
> >      --disable-bootstrap \
> >      --disable-libmudflap \
> >      --with-system-zlib \
> > -    --with-linker-hash-style=${LINKER_HASH_STYLE} \
> >      --enable-linker-build-id \
> >      --with-ppl=no \
> >      --with-cloog=no \
> > diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc
> b/meta/recipes-devtools/gcc/gcc-cross.inc
> > index f479360..850c63a 100644
> > --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > @@ -33,6 +33,7 @@ EXTRA_OECONF_PATHS = "\
> >      --with-sysroot=/not/exist \
> >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> >  "
> > +OECONF_HASH_STYLE = ""
>
> May be we can just explicitly override default LINKER_HASH_STYLE here
> by setting LINKER_HASH_STYLE = "sysv"
> which is effectively what we are doing by removing the option.


Ah, good idea, that would be simpler. Thanks, I'll try that.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160701/aa8847d1/attachment-0002.html>


More information about the Openembedded-core mailing list