aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/gcc/configure.ac
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-04-24 20:30:19 -0700
committerJing Yu <jingyu@google.com>2010-04-24 20:30:19 -0700
commitc2511ac51c9e6e6b8cd9900d6159d46718414012 (patch)
tree4f2d2810af6bf0b726c6f375258aab47ea9d8233 /gcc-4.4.0/gcc/configure.ac
parent2c20a1914acb75c3c654893a490b96b2df2edc7a (diff)
downloadtoolchain_gcc-c2511ac51c9e6e6b8cd9900d6159d46718414012.tar.gz
toolchain_gcc-c2511ac51c9e6e6b8cd9900d6159d46718414012.tar.bz2
toolchain_gcc-c2511ac51c9e6e6b8cd9900d6159d46718414012.zip
Fix a few divergence bugs and security problem.
See README.google for details. Change-Id: Ifbee6d934426a60f34c7301a04fc442c6c75df22
Diffstat (limited to 'gcc-4.4.0/gcc/configure.ac')
-rw-r--r--gcc-4.4.0/gcc/configure.ac19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc-4.4.0/gcc/configure.ac b/gcc-4.4.0/gcc/configure.ac
index 40052dab8..a2204be06 100644
--- a/gcc-4.4.0/gcc/configure.ac
+++ b/gcc-4.4.0/gcc/configure.ac
@@ -1969,6 +1969,17 @@ else
AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET)
fi])
+# Check to see if we are using gold instead of ld
+AC_MSG_CHECKING(whether we are using gold)
+ld_is_gold=no
+if test x$gcc_cv_ld != x; then
+ ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
+ if echo "$ld_ver" | grep "GNU gold" > /dev/null; then
+ ld_is_gold=yes
+ fi
+fi
+AC_MSG_RESULT($ld_is_gold)
+
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
AC_SUBST(ORIGINAL_LD_FOR_TARGET)
case "$ORIGINAL_LD_FOR_TARGET" in
@@ -2165,7 +2176,9 @@ else
changequote(,)dnl
gcc_cv_ld_hidden=yes
ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
- if echo "$ld_ver" | grep GNU > /dev/null; then
+ if test x"$ld_is_gold" == xyes; then
+ gcc_cv_ld_hidden=yes
+ elif echo "$ld_ver" | grep GNU > /dev/null; then
ld_vers=`echo $ld_ver | sed -n \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
@@ -2448,7 +2461,9 @@ else
[elf,2,16,0], [--fatal-warnings],
[.section .text,"axG",%progbits,.foo,comdat])
fi
-if test $in_tree_ld != yes && test x"$ld_vers" != x; then
+if test x"$ld_is_gold" == xyes; then
+ comdat_group=yes
+elif test $in_tree_ld != yes && test x"$ld_vers" != x; then
comdat_group=yes
if test 0"$ld_date" -lt 20050308; then
if test -n "$ld_date"; then