1.1 --- a/config/cc/gcc.in Mon Jun 27 13:52:15 2011 +0200
1.2 +++ b/config/cc/gcc.in Mon Jun 27 15:15:00 2011 +0200
1.3 @@ -277,6 +277,11 @@
1.4 config CC_GCC_HAS_BUILD_ID
1.5 bool
1.6
1.7 +# For the upcoming 4.7 ?
1.8 +# None have linker-hash-style support for now...
1.9 +config CC_GCC_HAS_LNK_HASH_STYLE
1.10 + bool
1.11 +
1.12 # Only enable gcc's support for plugins if binutils has it as well
1.13 # They are usefull only when doing LTO, but it does no harm enabling
1.14 # them even without LTO.
2.1 --- a/config/cc/gcc.in.2 Mon Jun 27 13:52:15 2011 +0200
2.2 +++ b/config/cc/gcc.in.2 Mon Jun 27 15:15:00 2011 +0200
2.3 @@ -211,3 +211,41 @@
2.4 option is ignored.
2.5
2.6 The default is off.
2.7 +
2.8 +choice CC_GCC_LNK_HASH_STYLE_CHOICE
2.9 + bool
2.10 + prompt "linker hash style"
2.11 + depends on CC_GCC_HAS_LNK_HASH_STYLE
2.12 +
2.13 +config CC_GCC_LNK_HASH_STYLE_DEFAULT
2.14 + bool
2.15 + prompt "Default"
2.16 + help
2.17 + Do not specify any value, and use the default value (sysv).
2.18 +
2.19 +config CC_GCC_LNK_HASH_STYLE_SYSV
2.20 + bool
2.21 + prompt "sysv"
2.22 + help
2.23 + Force use of the SYSV hash style.
2.24 +
2.25 +config CC_GCC_LNK_HASH_STYLE_GNU
2.26 + bool
2.27 + prompt "gnu"
2.28 + help
2.29 + Force use of the GNU hash style.
2.30 +
2.31 +config CC_GCC_LNK_HASH_STYLE_BOTH
2.32 + bool
2.33 + prompt "both"
2.34 + help
2.35 + Force use of both hash styles.
2.36 +
2.37 +endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
2.38 +
2.39 +config CC_GCC_LNK_HASH_STYLE
2.40 + string
2.41 + default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT
2.42 + default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
2.43 + default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
2.44 + default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
3.1 --- a/scripts/build/cc/gcc.sh Mon Jun 27 13:52:15 2011 +0200
3.2 +++ b/scripts/build/cc/gcc.sh Mon Jun 27 15:15:00 2011 +0200
3.3 @@ -262,6 +262,11 @@
3.4 extra_config+=( --enable-linker-build-id )
3.5 fi
3.6
3.7 + case "${CT_CC_GCC_LNK_HASH_STYLE}" in
3.8 + "") ;;
3.9 + *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
3.10 + esac
3.11 +
3.12 CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
3.13
3.14 # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
3.15 @@ -534,6 +539,11 @@
3.16 extra_config+=( --enable-linker-build-id )
3.17 fi
3.18
3.19 + case "${CT_CC_GCC_LNK_HASH_STYLE}" in
3.20 + "") ;;
3.21 + *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
3.22 + esac
3.23 +
3.24 if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
3.25 extra_config+=( --enable-plugin )
3.26 fi