aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/gcc/configure.ac
diff options
context:
space:
mode:
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