Skip to content

Commit

Permalink
Add mold linker to linker checks. (#866)
Browse files Browse the repository at this point in the history
Signed-off-by: Satadru Pramanik <[email protected]>
  • Loading branch information
satmandu authored Dec 13, 2024
1 parent f515eac commit 593cb01
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ AC_DEFUN([LIBFFI_CHECK_LINKER_FEATURES], [
if $LD --version 2>/dev/null | grep 'LLD '> /dev/null 2>&1; then
libat_ld_is_lld=yes
fi
libat_ld_is_mold=no
if $LD --version 2>/dev/null | grep 'mold '> /dev/null 2>&1; then
libat_ld_is_mold=yes
fi
changequote(,)
ldver=`$LD --version 2>/dev/null |
sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
Expand Down Expand Up @@ -336,6 +340,8 @@ if test $enable_symvers != no && test $libat_shared_libgcc = yes; then
enable_symvers=gnu
elif test $libat_ld_is_lld = yes ; then
enable_symvers=gnu
elif test $libat_ld_is_mold = yes ; then
enable_symvers=gnu
else
# The right tools, the right setup, but too old. Fallbacks?
AC_MSG_WARN(=== Linker version $libat_gnu_ld_version is too old for)
Expand Down

0 comments on commit 593cb01

Please sign in to comment.