_ACEOF
+# Check to see if we are using gold instead of ld
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gold" >&5
+$as_echo_n "checking whether we are using gold... " >&6; }
+ld_is_gold=no
+if test x$gcc_cv_ld != x; then
+ if $gcc_cv_ld --version 2>/dev/null | sed 1q \
+ | grep "GNU gold" > /dev/null; then
+ ld_is_gold=yes
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5
+$as_echo "$ld_is_gold" >&6; }
+
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
case "$ORIGINAL_LD_FOR_TARGET" in
if test $in_tree_ld != yes ; then
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'`
$as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
fi
-if test $in_tree_ld = yes ; then
+if test x"$ld_is_gold" = xyes; then
+ comdat_group=yes
+elif test $in_tree_ld = yes ; then
comdat_group=no
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
test $ac_status = 0; }; }
then
if test x$gcc_cv_ld != x \
- && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
- && (test x$gnu_ld_flag = xno \
- || (test x$gcc_cv_objdump != x \
- && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
- | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1)); then
- gcc_cv_as_sparc_gotdata_op=yes
+ && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+ if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then
+ if test x$gcc_cv_objdump != x; then
+ if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \
+ | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then
+ gcc_cv_as_sparc_gotdata_op=no
+ else
+ gcc_cv_as_sparc_gotdata_op=yes
+ fi
+ fi
+ else
+ gcc_cv_as_sparc_gotdata_op=yes
+ fi
fi
rm -f conftest
else