Skip to content

Commit 283d955

Browse files
committed
build: Fix shared lib linking for darwin with lld
libtool gets a false-positive from the warning produced by lld -single_module because it is already the default and unneeded. Skip the check unconditionally for Darwin linkers.
1 parent 137a98c commit 283d955

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ case $host in
8383
lt_cv_prog_compiler_pic="-DPIC"
8484
lt_cv_prog_compiler_pic_CXX="-DPIC"
8585
;;
86+
*darwin*)
87+
dnl Because it prints a verbose warning, lld fails the following check
88+
dnl for "-Wl,-single_module" from libtool.m4:
89+
dnl # If there is a non-empty error log, and "single_module"
90+
dnl # appears in it, assume the flag caused a linker warning
91+
dnl "-single_module" works fine on ld64 and lld, so just bypass the test.
92+
dnl Failure to set this to "yes" causes libtool to use a very broken
93+
dnl link-line for shared libs.
94+
lt_cv_apple_cc_single_mod="yes"
95+
;;
8696
esac
8797

8898
AC_ARG_WITH([seccomp],

0 commit comments

Comments
 (0)