public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6796] Enable configure detection of ld.mold.
@ 2022-01-21 14:52 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-01-21 14:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:97f819093433347ff9aec7276a668c3218c202d2

commit r12-6796-g97f819093433347ff9aec7276a668c3218c202d2
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Jan 21 14:52:55 2022 +0100

    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.

Diff:
---
 gcc/configure    | 18 ++++++++++++++++++
 gcc/configure.ac | 16 ++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/gcc/configure b/gcc/configure
index 3b228c3d9dc..bd4d4721868 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -23236,6 +23236,20 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5
 $as_echo "$ld_is_gold" >&6; }
 
+# Check to see if we are using mold instead of ld
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using mold" >&5
+$as_echo_n "checking whether we are using mold... " >&6; }
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_mold" >&5
+$as_echo "$ld_is_mold" >&6; }
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gold linker with split stack support as non default" >&5
 $as_echo_n "checking gold linker with split stack support as non default... " >&6; }
 # Check to see if default ld is not gold, but gold is
@@ -24118,6 +24132,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
@@ -25197,6 +25213,8 @@ $as_echo "$gcc_cv_as_comdat_group_group" >&6; }
 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 \
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 472d1c8c341..1171c946e6e 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 \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-21 14:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21 14:52 [gcc r12-6796] Enable configure detection of ld.mold Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).