[PATCH 3 of 4] cc/gcc: add option for linker hash style
Yann E. MORIN
yann.morin.1998@anciens.enib.fr
Mon Jun 27 21:40:00 GMT 2011
# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
# Date 1309180500 -7200
# Node ID 9d62710aa7ce46782da2cc122477b5350ca7c82b
# Parent bf2d0ee90afdc4878d5e398470833dc7caeb3bd6
cc/gcc: add option for linker hash style
Add an option to specify the hash type that gcc will ask the linker to use.
It is a provision for the upcoming 4.7, as no version currently supports it.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
diff --git a/config/cc/gcc.in b/config/cc/gcc.in
--- a/config/cc/gcc.in
+++ b/config/cc/gcc.in
@@ -260,6 +260,11 @@
config CC_GCC_HAS_BUILD_ID
bool
+# For the upcoming 4.7 ?
+# None have linker-hash-style support for now...
+config CC_GCC_HAS_LNK_HASH_STYLE
+ bool
+
# Only enable gcc's support for plugins if binutils has it as well
# They are usefull only when doing LTO, but it does no harm enabling
# them even without LTO.
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -212,3 +212,41 @@
option is ignored.
The default is off.
+
+choice CC_GCC_LNK_HASH_STYLE_CHOICE
+ bool
+ prompt "linker hash style"
+ depends on CC_GCC_HAS_LNK_HASH_STYLE
+
+config CC_GCC_LNK_HASH_STYLE_DEFAULT
+ bool
+ prompt "Default"
+ help
+ Do not specify any value, and use the default value (sysv).
+
+config CC_GCC_LNK_HASH_STYLE_SYSV
+ bool
+ prompt "sysv"
+ help
+ Force use of the SYSV hash style.
+
+config CC_GCC_LNK_HASH_STYLE_GNU
+ bool
+ prompt "gnu"
+ help
+ Force use of the GNU hash style.
+
+config CC_GCC_LNK_HASH_STYLE_BOTH
+ bool
+ prompt "both"
+ help
+ Force use of both hash styles.
+
+endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
+
+config CC_GCC_LNK_HASH_STYLE
+ string
+ default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT
+ default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
+ default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
+ default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -262,6 +262,11 @@
extra_config+=( --enable-linker-build-id )
fi
+ case "${CT_CC_GCC_LNK_HASH_STYLE}" in
+ "") ;
+ *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
+ esac
+
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
# Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
@@ -535,6 +540,11 @@
extra_config+=( --enable-linker-build-id )
fi
+ case "${CT_CC_GCC_LNK_HASH_STYLE}" in
+ "") ;
+ *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
+ esac
+
if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
extra_config+=( --enable-plugin )
fi
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list