Don't treat full_relro_flags as all one flag

This commit is contained in:
2024-04-02 14:20:22 -07:00
parent a534f3b758
commit 5bf72bda61
+1 -1
View File
@@ -36,7 +36,7 @@ endif()
add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum
-Werror=switch-enum -fPIC) -Werror=switch-enum -fPIC)
set(full_relro_flags "-pie LINKER:-z,relro,-z,now,-z,noexecstack") set(full_relro_flags "-pie;LINKER:-z,relro,-z,now,-z,noexecstack")
cmake_push_check_state() cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${full_relro_flags}) list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${full_relro_flags})
check_cxx_source_compiles("int main(){}" HAS_FULL_RELRO FAIL_REGEX "warning:") check_cxx_source_compiles("int main(){}" HAS_FULL_RELRO FAIL_REGEX "warning:")