commit:     10edbadeabd3b2bbec7c95c213810d7064e73ca4
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Nov  4 13:02:59 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  5 02:02:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10edbade

media-libs/opencv: work around gcc-15 bug in dnn

Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116352
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

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

diff --git a/media-libs/opencv/opencv-4.10.0.ebuild 
b/media-libs/opencv/opencv-4.10.0.ebuild
index 27100bf19dbb..790cacb306ff 100644
--- a/media-libs/opencv/opencv-4.10.0.ebuild
+++ b/media-libs/opencv/opencv-4.10.0.ebuild
@@ -544,6 +544,10 @@ multilib_src_configure() {
        # bug #919101 and https://github.com/opencv/opencv/issues/19020
        filter-lto
 
+       if tc-is-gcc && [[ $(gcc-major-version) -ge 15 ]] && use contribdnn; 
then
+               append-cxxflags "-fno-tree-vectorize"
+       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