commit:     b68a28b22715fc0db5154d091c0e5c906209dd10
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue May 14 20:41:58 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 10:19:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b68a28b2

games-emulation/melonds-jg: mark as LTO-unsafe, strict-aliasing unsafe

Closes: https://bugs.gentoo.org/931907
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-emulation/melonds-jg/melonds-jg-0.9.5.ebuild | 10 +++++++++-
 games-emulation/melonds-jg/melonds-jg-9999.ebuild  | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/games-emulation/melonds-jg/melonds-jg-0.9.5.ebuild 
b/games-emulation/melonds-jg/melonds-jg-0.9.5.ebuild
index a927283b5272..e85a48508359 100644
--- a/games-emulation/melonds-jg/melonds-jg-0.9.5.ebuild
+++ b/games-emulation/melonds-jg/melonds-jg-0.9.5.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit toolchain-funcs
+inherit toolchain-funcs flag-o-matic
 
 MY_PN=${PN%-*}
 MY_P=${MY_PN}-${PV}
@@ -40,6 +40,14 @@ PATCHES=(
 )
 
 src_compile() {
+       # -Werror=strict-aliasing
+       # https://bugs.gentoo.org/931907
+       #
+       # Not trivial to fix and its a problem in melonds upstream.
+       # Its also uncertain if this port will be updated in the future.
+       append-flags -fno-strict-aliasing
+       filter-lto
+
        emake -C jollygood \
                CC="$(tc-getCC)" \
                CXX="$(tc-getCXX)" \

diff --git a/games-emulation/melonds-jg/melonds-jg-9999.ebuild 
b/games-emulation/melonds-jg/melonds-jg-9999.ebuild
index bc683935d9e5..af1f24fc344a 100644
--- a/games-emulation/melonds-jg/melonds-jg-9999.ebuild
+++ b/games-emulation/melonds-jg/melonds-jg-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit toolchain-funcs
+inherit toolchain-funcs flag-o-matic
 
 MY_PN=${PN%-*}
 MY_P=${MY_PN}-${PV}
@@ -34,6 +34,14 @@ BDEPEND="
 "
 
 src_compile() {
+       # -Werror=strict-aliasing
+       # https://bugs.gentoo.org/931907
+       #
+       # Not trivial to fix and its a problem in melonds upstream.
+       # Its also uncertain if this port will be updated in the future.
+       append-flags -fno-strict-aliasing
+       filter-lto
+
        emake -C jollygood \
                CC="$(tc-getCC)" \
                CXX="$(tc-getCXX)" \

Reply via email to