Skip to content

Commit

Permalink
build: Fix shared lib linking for darwin with lld
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
theuni committed May 12, 2023
1 parent 137a98c commit 283d955
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ case $host in
lt_cv_prog_compiler_pic="-DPIC"
lt_cv_prog_compiler_pic_CXX="-DPIC"
;;
*darwin*)
dnl Because it prints a verbose warning, lld fails the following check
dnl for "-Wl,-single_module" from libtool.m4:
dnl # If there is a non-empty error log, and "single_module"
dnl # appears in it, assume the flag caused a linker warning
dnl "-single_module" works fine on ld64 and lld, so just bypass the test.
dnl Failure to set this to "yes" causes libtool to use a very broken
dnl link-line for shared libs.
lt_cv_apple_cc_single_mod="yes"
;;
esac

AC_ARG_WITH([seccomp],
Expand Down

0 comments on commit 283d955

Please sign in to comment.