media-libs/blend2d: avoid adding -O2 to CFLAGS

Closes: https://bugs.gentoo.org/943226
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
This commit is contained in:
Alexander Golubev 2024-11-11 12:43:47 +03:00
parent 30174bba83
commit cd71815a8a
No known key found for this signature in database
GPG Key ID: 4CDFCE07C526D2D7
3 changed files with 27 additions and 0 deletions

View File

@ -24,6 +24,9 @@ RDEPEND="jit? ( >=dev-libs/asmjit-2024.10.25 )"
DEPEND="${RDEPEND}"
DOCS=( README.md CONTRIBUTING.md )
PATCHES=(
"${FILESDIR}/blend2d-0.11.4-avoid-adding-O2-to-cflags-gentoo-bug-943226.patch"
)
# see https://github.com/blend2d/blend2d/issues/217
CMAKE_SKIP_TESTS="bl_test_image_io"

View File

@ -24,6 +24,9 @@ RDEPEND="jit? ( >=dev-libs/asmjit-2024.10.25 )"
DEPEND="${RDEPEND}"
DOCS=( README.md CONTRIBUTING.md )
PATCHES=(
"${FILESDIR}/blend2d-0.11.4-avoid-adding-O2-to-cflags-gentoo-bug-943226.patch"
)
src_configure() {
local mycmakeargs=(

View File

@ -0,0 +1,21 @@
Avoid adding -O2 to CFLAGS; gentoo bug #943226
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7372bab..665ed23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -555,7 +555,6 @@ if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" OR "x${CMAKE_CXX_COMPILER_FRONT
list(APPEND BLEND2D_PRIVATE_CFLAGS_REL
-GS- # [-] Buffer security-check.
- -O2 # [+] Favor speed over size.
-Oi) # [+] Generate Intrinsic Functions.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
@@ -564,7 +563,6 @@ if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" OR "x${CMAKE_CXX_COMPILER_FRONT
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang")
list(APPEND BLEND2D_PRIVATE_CFLAGS -Wall -Wextra)
list(APPEND BLEND2D_PRIVATE_CFLAGS -fno-exceptions -fno-rtti -fno-math-errno)
- list(APPEND BLEND2D_PRIVATE_CFLAGS_REL -O2)
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "iOS")
# Disable these flags in case somebody uses -ffast-math globally.