fanquake
commented at 3:13 PM on November 3, 2023:
member
This is deprecated on macOS:
ld: 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:
# Don't allow lazy linking, it breaks C++ global constructors
# But is supposedly fixed on 10.4 or later (yay!).
if test CXX = "$tagname"; then
case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10.[0123])
func_append compile_command " $wl-bind_at_load"
func_append finalize_command " $wl-bind_at_load"
;;
esac
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.
DrahtBot
commented at 3:13 PM on November 3, 2023:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
I do hate sed. Pulled this is for now, but open to any other approaches if anyone has suggestions.
One other point is that last time I looked, lld only implemented a placeholder option for -bind_at_load, and I'd assume at this point, they won't bother actually implementing it, so after #21778 this flag will be even more of a no-op.
fanquake
commented at 10:47 AM on November 8, 2023:
member
theuni
commented at 5:04 PM on November 9, 2023:
member
utACK.
Whoops, I butchered that commit message. I forgot to paste in the commit hash I was referencing. Mind fixing it up?
build: remove -bind_at_load usage
This is deprecated on macOS:
```bash
ld: 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`:
```bash
# Don't allow lazy linking, it breaks C++ global constructors
# But is supposedly fixed on 10.4 or later (yay!).
if test CXX = "$tagname"; then
case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10.[0123])
func_append compile_command " $wl-bind_at_load"
func_append finalize_command " $wl-bind_at_load"
;;
esac
fi
```
so this doesn't remove all the warnings, but removes us as a potential
source of them.
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`.
45257601da
fanquake
commented at 5:08 PM on November 9, 2023:
member
I forgot to paste in the commit hash I was referencing. Mind fixing it up?
Pretty sure it is there? "Similar to a98356fee8a44d7d1cb37f22c876fff8f244365e."
theuni
commented at 5:13 PM on November 9, 2023:
member
I forgot to paste in the commit hash I was referencing. Mind fixing it up?
hebasto
commented at 4:10 PM on November 13, 2023:
member
ACK3c61c60b90db1b6a77b3804784430fcd57b447b6, tested on macOS Sonoma 14.1.1 (23B81, Apple M1) and Ubuntu 23.10 (cross-compiling for macOS). Also I've verified the actual diff in the libtool script.
fanquake merged this on Nov 14, 2023
fanquake closed this on Nov 14, 2023
fanquake deleted the branch on Nov 14, 2023
DrahtBot
commented at 12:47 PM on November 14, 2023:
contributor
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me