aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-01-21 14:52:55 +0100
committerMartin Liska <mliska@suse.cz>2022-01-21 15:48:44 +0100
commit97f819093433347ff9aec7276a668c3218c202d2 (patch)
treefeea6fc95674fb9358f2119b15408805ac31d2e7 /gcc/configure.ac
parent199cd0e0f8744ca1e61a95987b2d020a592a46d9 (diff)
downloadgcc-97f819093433347ff9aec7276a668c3218c202d2.zip
gcc-97f819093433347ff9aec7276a668c3218c202d2.tar.gz
gcc-97f819093433347ff9aec7276a668c3218c202d2.tar.bz2
Enable configure detection of ld.mold.
gcc/ChangeLog: * configure.ac: Detect ld_is_mold and use it for comdat_group=yes and gcc_cv_ld_hidden=yes. * configure: Regenerate.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 472d1c8..1171c94 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2671,6 +2671,18 @@ if test x$gcc_cv_ld != x; then
fi
AC_MSG_RESULT($ld_is_gold)
+# Check to see if we are using mold instead of ld
+AC_MSG_CHECKING(whether we are using mold)
+ld_is_mold=no
+if test x$gcc_cv_ld != x; then
+ if $gcc_cv_ld --version 2>/dev/null | sed 1q \
+ | grep "mold" > /dev/null; then
+ ld_is_mold=yes
+ fi
+fi
+AC_MSG_RESULT($ld_is_mold)
+
+
AC_MSG_CHECKING(gold linker with split stack support as non default)
# Check to see if default ld is not gold, but gold is
# available and has support for split stack. If gcc was configured
@@ -3069,6 +3081,8 @@ else
gcc_cv_ld_hidden=yes
if test x"$ld_is_gold" = xyes; then
:
+ elif test x"$ld_is_mold" = xyes; then
+ :
elif echo "$ld_ver" | grep GNU > /dev/null; then
if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then
@@ -3538,6 +3552,8 @@ else
fi
if test x"$ld_is_gold" = xyes; then
comdat_group=yes
+elif test x"$ld_is_mold" = 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 \