From e4c24d84dc9733ec2a53913270226524495dcb6d Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 14 Apr 2024 07:22:12 -0400 Subject: [PATCH] add -z noexecstack for linux --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 372f680b..317ef3a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,7 +343,11 @@ if (BUILD_LIBRARY) ) if (WIN32) - target_link_options(monero-cpp PUBLIC "-Wl,--enable-auto-import,--export-all-symbols") + target_link_options(monero-cpp PUBLIC "-Wl,--enable-auto-import,--export-all-symbols") +endif() + +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + target_link_options(monero-cpp PRIVATE "-z" "noexecstack") endif() INSTALL(FILES src/daemon/monero_daemon.h