This is deprecated on macOS:
0ld: warning: -bind_at_load is deprecated on macOS
and likely redundant anyways, given the behaviour of dyld3.
Unfortunately libtool is still injecting a -bind_at_load
, because it’s version check is broken:
0 # Don't allow lazy linking, it breaks C++ global constructors
1 # But is supposedly fixed on 10.4 or later (yay!).
2 if test CXX = "$tagname"; then
3 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
4 10.[0123])
5 func_append compile_command " $wl-bind_at_load"
6 func_append finalize_command " $wl-bind_at_load"
7 ;;
8 esac
9 fi
so this adds another change to strip them out at the end of configure.
Note that anywhere the ld64 warnings are being emitted, we are already not adding this flag to our hardened ldflags, because of -Wl,-fatal_warnings
.