Merge bitcoin/bitcoin#31359: cmake: Add CheckLinkerSupportsPIE module
81c174e318cmake: Refer to the configure log instead of printing PIE test error (Hennadii Stepanov)65a0920ca6cmake: Add `CheckLinkerSupportsPIE` module (Hennadii Stepanov) Pull request description: This new module is a wrapper around CMake's `CheckPIESupported` module that fixes an upstream bug. See: https://gitlab.kitware.com/cmake/cmake/-/issues/26463. Fixes https://github.com/bitcoin/bitcoin/issues/30771. ACKs for top commit: theuni: utACK81c174e318. vasild: ACK81c174e318Tree-SHA512: 77d7022238551a4e69c59d1fe6b78975bb552cbbed5339459853d7ebf0086813036081f464fed230be330b3bd7d6cf8590b536b064028d2f786d6ae40f342f95
This commit is contained in:
2 files changed
+29
-10
No files matched your search
+2
-10
@@ -194,16 +194,8 @@ string(APPEND CMAKE_CXX_LINK_EXECUTABLE " ${APPEND_LDFLAGS}")
|
||||
|
||||
set(configure_warnings)
|
||||
|
||||
include(CheckPIESupported)
|
||||
check_pie_supported(OUTPUT_VARIABLE check_pie_output LANGUAGES CXX)
|
||||
if(CMAKE_CXX_LINK_PIE_SUPPORTED)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
elseif(NOT WIN32)
|
||||
# The warning is superfluous for Windows.
|
||||
message(WARNING "PIE is not supported at link time: ${check_pie_output}")
|
||||
list(APPEND configure_warnings "Position independent code disabled.")
|
||||
endif()
|
||||
unset(check_pie_output)
|
||||
include(CheckLinkerSupportsPIE)
|
||||
check_linker_supports_pie(configure_warnings)
|
||||
|
||||
# The core_interface library aims to encapsulate common build flags.
|
||||
# It is a usage requirement for all targets except for secp256k1, which
|
||||
|
||||
Reference in new issue
Block a user