summaryrefslogtreecommitdiff
path: root/libstdc++-v3/acinclude.m4
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-01-21 17:10:07 +0100
committerMartin Liska <mliska@suse.cz>2022-01-31 09:46:44 +0100
commitc99a6eb01536d18e700a3c6935714a0fa0c96340 (patch)
treee4be1bab051d6cc0578a1a0ad18f43c37fb76d6b /libstdc++-v3/acinclude.m4
parent625f16c798757dcbfdded841f01d7c566d15c55c (diff)
Add mold detection for libs.
libatomic/ChangeLog: * acinclude.m4: Detect *_ld_is_mold and use it. * configure: Regenerate. libgomp/ChangeLog: * acinclude.m4: Detect *_ld_is_mold and use it. * configure: Regenerate. libitm/ChangeLog: * acinclude.m4: Detect *_ld_is_mold and use it. * configure: Regenerate. libstdc++-v3/ChangeLog: * acinclude.m4: Detect *_ld_is_mold and use it. * configure: Regenerate.
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r--libstdc++-v3/acinclude.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index a93252076b9..32638e6bfc5 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -172,6 +172,7 @@ dnl LD (as a side effect of testing)
dnl Sets:
dnl with_gnu_ld
dnl glibcxx_ld_is_gold (set to "no" or "yes")
+dnl glibcxx_ld_is_mold (set to "no" or "yes")
dnl glibcxx_gnu_ld_version (possibly)
dnl
dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
@@ -204,11 +205,14 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
# Start by getting the version number. I think the libtool test already
# does some of this, but throws away the result.
glibcxx_ld_is_gold=no
+ glibcxx_ld_is_mold=no
if test x"$with_gnu_ld" = x"yes"; then
AC_MSG_CHECKING([for ld version])
changequote(,)
if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then
glibcxx_ld_is_gold=yes
+ elif $LD --version 2>/dev/null | grep 'mold' >/dev/null 2>&1; then
+ glibcxx_ld_is_mold=yes
fi
ldver=`$LD --version 2>/dev/null |
sed -e 's/[. ][0-9]\{8\}$//;s/.* \([^ ]\{1,\}\)$/\1/; q'`
@@ -220,7 +224,7 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
# Set --gc-sections.
glibcxx_have_gc_sections=no
- if test "$glibcxx_ld_is_gold" = "yes"; then
+ if test "$glibcxx_ld_is_gold" = "yes" || test "$glibcxx_ld_is_mold" = "yes" ; then
if $LD --help 2>/dev/null | grep gc-sections >/dev/null 2>&1; then
glibcxx_have_gc_sections=yes
fi
@@ -3796,6 +3800,8 @@ changequote([,])dnl
enable_symvers=no
elif test $glibcxx_ld_is_gold = yes ; then
: All versions of gold support symbol versioning.
+ elif test $glibcxx_ld_is_mold = yes ; then
+ : All versions of mold support symbol versioning.
elif test $glibcxx_gnu_ld_version -lt $glibcxx_min_gnu_ld_version ; then
# The right tools, the right setup, but too old. Fallbacks?
AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)