commit:     899426ac479fc0c4d38d746143561e369d47a2e5
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 28 11:07:02 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Oct 28 11:15:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=899426ac

gui-libs/egl-x11: quick workaround for clang

Not really looked at what exactly causes this yet, but fwiw "seems"
fine if compiled with -O0 (which implies there's likely some UB in
egl-x11's code).

Optimizations are not important for this library, so do a quick -O0
workaround for the time being.

Bug: https://bugs.gentoo.org/942396
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 ....0_pre20240919.ebuild => egl-x11-1.0.0_pre20240919-r1.ebuild} | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gui-libs/egl-x11/egl-x11-1.0.0_pre20240919.ebuild 
b/gui-libs/egl-x11/egl-x11-1.0.0_pre20240919-r1.ebuild
similarity index 81%
rename from gui-libs/egl-x11/egl-x11-1.0.0_pre20240919.ebuild
rename to gui-libs/egl-x11/egl-x11-1.0.0_pre20240919-r1.ebuild
index 16ded7bb7709..545151e96bd8 100644
--- a/gui-libs/egl-x11/egl-x11-1.0.0_pre20240919.ebuild
+++ b/gui-libs/egl-x11/egl-x11-1.0.0_pre20240919-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit meson-multilib
+inherit flag-o-matic meson-multilib toolchain-funcs
 
 # no releases yet, should typically update hash in sync with nvidia bumps
 HASH_EGLX11=8aac36c712561ebfecc82af3db15c50cd0d573fb
@@ -35,3 +35,10 @@ DEPEND="
        media-libs/libglvnd
        x11-base/xorg-proto
 "
+
+src_configure() {
+       # needs looking into, likely some UB broken at >=-O1 (bug #942396)
+       tc-is-clang && replace-flags '-O*' '-O0'
+
+       meson-multilib_src_configure
+}

Reply via email to