<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 1, 2016 at 2:19 PM, Khem Raj <span dir="ltr"><<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Jul 1, 2016 at 1:44 PM, Christopher Larson <<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>> wrote:<br>
</span><div><div class="">> From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
><br>
> We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to<br>
> this in the toolchain, while convenient, actually hides bugs, as a failure to<br>
> obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we<br>
> poison the sysroot -- rather than relying on the default, notice right away if<br>
> somoeone isn't obeying the needed flags.<br>
><br>
> This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,<br>
> which is what's often seen with external toolchains. This brings us all on the<br>
> same page, and makes sure a failure to obey LDFLAGS is seen early.<br>
><br>
> This is limited to cross, to retain ease of use for SDKs.<br>
><br>
> Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
> ---<br>
> meta/recipes-devtools/gcc/gcc-4.9.inc | 3 ++-<br>
> meta/recipes-devtools/gcc/gcc-5.3.inc | 3 ++-<br>
> meta/recipes-devtools/gcc/gcc-6.1.inc | 3 ++-<br>
> meta/recipes-devtools/gcc/gcc-cross.inc | 1 +<br>
> 4 files changed, 7 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc<br>
> index 64701c8..05e02d9 100644<br>
> --- a/meta/recipes-devtools/gcc/gcc-4.9.inc<br>
> +++ b/meta/recipes-devtools/gcc/gcc-4.9.inc<br>
> @@ -107,13 +107,14 @@ JAVA = ""<br>
><br>
> LTO = "--enable-lto"<br>
><br>
> +OECONF_HASH_STYLE = "--with-linker-hash-style=${LINKER_HASH_STYLE}"<br>
> EXTRA_OECONF_BASE = "\<br>
> ${LTO} \<br>
> + ${OECONF_HASH_STYLE} \<br>
> --enable-libssp \<br>
> --disable-bootstrap \<br>
> --disable-libmudflap \<br>
> --with-system-zlib \<br>
> - --with-linker-hash-style=${LINKER_HASH_STYLE} \<br>
> --enable-linker-build-id \<br>
> --with-ppl=no \<br>
> --with-cloog=no \<br>
> diff --git a/meta/recipes-devtools/gcc/gcc-5.3.inc b/meta/recipes-devtools/gcc/gcc-5.3.inc<br>
> index 8613a10..faa1292 100644<br>
> --- a/meta/recipes-devtools/gcc/gcc-5.3.inc<br>
> +++ b/meta/recipes-devtools/gcc/gcc-5.3.inc<br>
> @@ -113,14 +113,15 @@ JAVA = ""<br>
><br>
> LTO = "--enable-lto"<br>
><br>
> +OECONF_HASH_STYLE = "--with-linker-hash-style=${LINKER_HASH_STYLE}"<br>
> EXTRA_OECONF_BASE = "\<br>
> ${LTO} \<br>
> + ${OECONF_HASH_STYLE} \<br>
> --enable-libssp \<br>
> --enable-libitm \<br>
> --disable-bootstrap \<br>
> --disable-libmudflap \<br>
> --with-system-zlib \<br>
> - --with-linker-hash-style=${LINKER_HASH_STYLE} \<br>
> --enable-linker-build-id \<br>
> --with-ppl=no \<br>
> --with-cloog=no \<br>
> diff --git a/meta/recipes-devtools/gcc/gcc-6.1.inc b/meta/recipes-devtools/gcc/gcc-6.1.inc<br>
> index 1a00f3f..e3ff9cb 100644<br>
> --- a/meta/recipes-devtools/gcc/gcc-6.1.inc<br>
> +++ b/meta/recipes-devtools/gcc/gcc-6.1.inc<br>
> @@ -93,14 +93,15 @@ JAVA = ""<br>
><br>
> LTO = "--enable-lto"<br>
><br>
> +OECONF_HASH_STYLE = "--with-linker-hash-style=${LINKER_HASH_STYLE}"<br>
> EXTRA_OECONF_BASE = "\<br>
> ${LTO} \<br>
> + ${OECONF_HASH_STYLE} \<br>
> --enable-libssp \<br>
> --enable-libitm \<br>
> --disable-bootstrap \<br>
> --disable-libmudflap \<br>
> --with-system-zlib \<br>
> - --with-linker-hash-style=${LINKER_HASH_STYLE} \<br>
> --enable-linker-build-id \<br>
> --with-ppl=no \<br>
> --with-cloog=no \<br>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc<br>
> index f479360..850c63a 100644<br>
> --- a/meta/recipes-devtools/gcc/gcc-cross.inc<br>
> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc<br>
> @@ -33,6 +33,7 @@ EXTRA_OECONF_PATHS = "\<br>
> --with-sysroot=/not/exist \<br>
> --with-build-sysroot=${STAGING_DIR_TARGET} \<br>
> "<br>
> +OECONF_HASH_STYLE = ""<br>
<br>
</div></div>May be we can just explicitly override default LINKER_HASH_STYLE here<br>
by setting LINKER_HASH_STYLE = "sysv"<br>
which is effectively what we are doing by removing the option.</blockquote></div><br>Ah, good idea, that would be simpler. Thanks, I'll try that.<br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>