From ef4c67eac4e08df6aa28226f1e636e877f1c04fe Mon Sep 17 00:00:00 2001 From: Adam Pimentel Date: Sat, 4 Feb 2023 03:44:41 -0500 Subject: [PATCH] net-p2p/feather: prevent supercop assembly compilation from creating executable stack Closes: https://bugs.gentoo.org/892575 Signed-off-by: Adam Pimentel --- net-p2p/feather/files/feather_remove_cflags-2.2.3.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net-p2p/feather/files/feather_remove_cflags-2.2.3.patch b/net-p2p/feather/files/feather_remove_cflags-2.2.3.patch index e3a36c9af8..480179a15f 100644 --- a/net-p2p/feather/files/feather_remove_cflags-2.2.3.patch +++ b/net-p2p/feather/files/feather_remove_cflags-2.2.3.patch @@ -1,6 +1,6 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -284,12 +284,6 @@ +@@ -284,12 +284,8 @@ add_c_flag_if_supported(-fPIC C_SECURITY_FLAGS) add_cxx_flag_if_supported(-fPIC CXX_SECURITY_FLAGS) @@ -11,6 +11,8 @@ -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}") -+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${STATIC_FLAGS}") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wa,--noexecstack") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wa,--noexecstack") ++set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,noexecstack ${STATIC_FLAGS}") add_subdirectory(src)