commit:     ef4c67eac4e08df6aa28226f1e636e877f1c04fe
Author:     Adam Pimentel <adam.pimentel <AT> protonmail <DOT> com>
AuthorDate: Sat Feb  4 08:44:41 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Feb  4 08:44:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ef4c67ea

net-p2p/feather: prevent supercop assembly compilation from creating executable 
stack

Closes: https://bugs.gentoo.org/892575
Signed-off-by: Adam Pimentel <adam.pimentel <AT> protonmail.com>

 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 e3a36c9af..480179a15 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)

Reply via email to