commit: 17ce27a5e6dc97311ddd178fabccea3141b1ca95 Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com> AuthorDate: Tue Jun 28 17:06:27 2022 +0000 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> CommitDate: Tue Jun 28 19:59:09 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17ce27a5
dev-libs/intel-compute-runtime: add patch to remove `-D_FORTIFY_SOURCE=2` configuration from build process Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com> Closes: https://github.com/gentoo/gentoo/pull/26119 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> ...-runtime-22.24.23453-remove-fortify-sources.patch | 20 ++++++++++++++++++++ .../intel-compute-runtime-22.24.23453.ebuild | 6 +++--- .../intel-compute-runtime-22.25.23529.ebuild | 6 +++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dev-libs/intel-compute-runtime/files/intel-compute-runtime-22.24.23453-remove-fortify-sources.patch b/dev-libs/intel-compute-runtime/files/intel-compute-runtime-22.24.23453-remove-fortify-sources.patch new file mode 100644 index 000000000000..dc0ab96dde0c --- /dev/null +++ b/dev-libs/intel-compute-runtime/files/intel-compute-runtime-22.24.23453-remove-fortify-sources.patch @@ -0,0 +1,20 @@ +diff --git a/compute-runtime-22.24.23453/CMakeLists.txt b/compute-runtime-22.24.23453/CMakeLists.txt +index f227808..83075f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -702,7 +702,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") + else() + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -D_FORTIFY_SOURCE=2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") + else() + # gcc, g++ only +@@ -711,7 +710,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong") + endif() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -D_FORTIFY_SOURCE=2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,-z,noexecstack") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,-z,relro") diff --git a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild index bdc8a84baf08..077189e165cf 100644 --- a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild +++ b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild @@ -41,11 +41,11 @@ BDEPEND="virtual/pkgconfig" DOCS=( "README.md" "FAQ.md" ) -src_prepare() { - default +PATCHES=( "${FILESDIR}/${PN}-22.24.23453-remove-fortify-sources.patch" ) +src_prepare() { # Remove '-Werror' from default - set -e '/Werror/d' -i CMakeLists.txt || die + sed -e '/Werror/d' -i CMakeLists.txt || die cmake_src_prepare } diff --git a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild index bdc8a84baf08..077189e165cf 100644 --- a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild +++ b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild @@ -41,11 +41,11 @@ BDEPEND="virtual/pkgconfig" DOCS=( "README.md" "FAQ.md" ) -src_prepare() { - default +PATCHES=( "${FILESDIR}/${PN}-22.24.23453-remove-fortify-sources.patch" ) +src_prepare() { # Remove '-Werror' from default - set -e '/Werror/d' -i CMakeLists.txt || die + sed -e '/Werror/d' -i CMakeLists.txt || die cmake_src_prepare }
