From 5bf72bda6136fb836bfc0b4a5ccbd23d7bc4e846 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 2 Apr 2024 14:20:22 -0700 Subject: [PATCH] Don't treat full_relro_flags as all one flag --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f94807f..ca03586 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ endif() add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum -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() list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${full_relro_flags}) check_cxx_source_compiles("int main(){}" HAS_FULL_RELRO FAIL_REGEX "warning:")