Seen as part of this thread: https://github.com/hebasto/bitcoin/issues/341#issuecomment-2321282757.
It looks like CMakes https://cmake.org/cmake/help/latest/module/CheckPIESupported.html check isn’t quite the equivalent of what we used to do in Autotools (having -pie
and -fPIE
as part of our hardened flags), such that now, sometimes the user will need to manually pass flags like -fPIE
. In this case, on a FreeBSD system.
It’s not entirely clear if this is a bug in CMake, or something else, however, we should fix this, as users/developers should not need to manually pass PIC
/PIE
related flags for working compilation, aside from it being a missing hardening feature.