commit:     067920105bbfc2ab7ecb994c1079432524c521df
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 24 03:26:55 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 24 03:27:23 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06792010

media-libs/opencv: add -fno-tree-loop-vectorize for gcc trunk

Temporary workaround.

Bug: https://gcc.gnu.org/PR118464
Closes: https://bugs.gentoo.org/948071
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/opencv/opencv-4.10.0.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/media-libs/opencv/opencv-4.10.0.ebuild 
b/media-libs/opencv/opencv-4.10.0.ebuild
index 4bb3003623f7..40354686489c 100644
--- a/media-libs/opencv/opencv-4.10.0.ebuild
+++ b/media-libs/opencv/opencv-4.10.0.ebuild
@@ -565,6 +565,11 @@ multilib_src_configure() {
        # bug #919101 and https://github.com/opencv/opencv/issues/19020
        filter-lto
 
+       # bug #948071 (gcc PR118464)
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 15 ]]; then
+               append-cxxflags "-fno-tree-loop-optimize"
+       fi
+
        # please don't sort here, order is the same as in CMakeLists.txt
        local mycmakeargs=(
                -DMIN_VER_CMAKE=3.26

Reply via email to