From 4df7f7c86a0a105b5d3764121f259a39487a6c8a Mon Sep 17 00:00:00 2001 From: Krzysztof Wolicki Date: Mon, 25 Sep 2023 03:43:30 +0200 Subject: [PATCH] Add `-fno-stack-protector` to flags when building libzigcpp This allows both debug and release builds to link to it without forcing release builds to link to libssp --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 840d4e7412..28c2dcc8e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -694,9 +694,9 @@ endif() add_library(zigcpp STATIC ${ZIG_CPP_SOURCES}) if(ZIG_PIE) - set(ZIGCPP_CXX_FLAGS "${EXE_CXX_FLAGS} -fPIC") + set(ZIGCPP_CXX_FLAGS "${EXE_CXX_FLAGS} -fno-stack-protector -fPIC") else() - set(ZIGCPP_CXX_FLAGS "${EXE_CXX_FLAGS}") + set(ZIGCPP_CXX_FLAGS "${EXE_CXX_FLAGS} -fno-stack-protector") endif() set_target_properties(zigcpp PROPERTIES COMPILE_FLAGS ${ZIGCPP_CXX_FLAGS})