diff options
author | Ed Maste <emaste@freebsd.org> | 2017-12-17 23:08:12 -0500 |
---|---|---|
committer | Ed Maste <emaste@freebsd.org> | 2017-12-17 23:08:52 -0500 |
commit | af6949b7af98404729e04227165d0e32ce550ce8 (patch) | |
tree | 86450aec32dc34aacc528f5bb6b35a595ef7d1ff /acinclude.m4 | |
parent | 716bfd83177689e2244c4707bd513003cff92c68 (diff) | |
download | libffi-af6949b7af98404729e04227165d0e32ce550ce8.tar.gz |
Enable symbol versioning when ld is LLVM's lld
Fixes #397
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 6 |
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) |