diff options
author | Randall T. Vasquez <ran.dall@icloud.com> | 2022-06-28 10:06:27 -0700 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2022-06-28 21:59:09 +0200 |
commit | 17ce27a5e6dc97311ddd178fabccea3141b1ca95 (patch) | |
tree | d73ab7b80a04d2773e0e3ff7f9ccc2cca33be7cf | |
parent | dev-python/keystoneauth: Remove old (diff) | |
download | gentoo-17ce27a5e6dc97311ddd178fabccea3141b1ca95.tar.gz gentoo-17ce27a5e6dc97311ddd178fabccea3141b1ca95.tar.bz2 gentoo-17ce27a5e6dc97311ddd178fabccea3141b1ca95.zip |
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@icloud.com>
Closes: https://github.com/gentoo/gentoo/pull/26119
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
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 } |