1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-24 02:23:45 +01:00

cmake: disable '-pie' on Win with gcc

This commit is contained in:
xiphon 2020-05-14 18:48:08 +00:00
parent afe1ae9b9c
commit 210248e6ef

View File

@ -369,8 +369,8 @@ if (NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VER
endif() endif()
# linker # linker
if (NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1))) if (NOT (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
# Windows binaries die on startup with PIE when compiled with GCC <9.x # Windows binaries die on startup with PIE when compiled with GCC
add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS) add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
endif() endif()
add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS) add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)