[OE-core] [PATCHv2] gcc-cross: remove --with-linker-hash-style
Christopher Larson
kergoth at gmail.com
Fri Jul 1 20:44:57 UTC 2016
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 = ""
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
--
2.8.0
More information about the Openembedded-core
mailing list