summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2017-12-17 23:08:12 -0500
committerEd Maste <emaste@freebsd.org>2017-12-17 23:08:52 -0500
commitaf6949b7af98404729e04227165d0e32ce550ce8 (patch)
tree86450aec32dc34aacc528f5bb6b35a595ef7d1ff /acinclude.m4
parent716bfd83177689e2244c4707bd513003cff92c68 (diff)
downloadlibffi-af6949b7af98404729e04227165d0e32ce550ce8.tar.gz
Enable symbol versioning when ld is LLVM's lld
Fixes #397
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 5df37a8..1a70efb 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -278,6 +278,10 @@ AC_DEFUN([LIBFFI_CHECK_LINKER_FEATURES], [
if $LD --version 2>/dev/null | grep 'GNU gold'> /dev/null 2>&1; then
libat_ld_is_gold=yes
fi
+ libat_ld_is_lld=no
+ if $LD --version 2>/dev/null | grep 'LLD '> /dev/null 2>&1; then
+ libat_ld_is_lld=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'`
@@ -432,6 +436,8 @@ if test $enable_symvers != no && test $libat_shared_libgcc = yes; then
enable_symvers=gnu
elif test $libat_ld_is_gold = yes ; then
enable_symvers=gnu
+ elif test $libat_ld_is_lld = 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)