commit: 4a0b19c40778736c971a3ef371413404b25ceac0 Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com> AuthorDate: Fri Mar 15 19:42:20 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Mar 15 20:21:37 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0b19c4
games-emulation/advancemame: suppress compiler optimizations with fire Upstream configure.ac sets some sanity flags, but only when CFLAGS aren't defined. They acknowledge the codebase was written "when compilers where not aggressively optimizing undefined behaviour". We should respect that even though we do set CFLAGS. Also suppress LTO because why on earth should we assume that will work if they have that much UB. Closes: https://bugs.gentoo.org/858626 Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> .../{advancemame-3.9.ebuild => advancemame-3.9-r1.ebuild} | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/games-emulation/advancemame/advancemame-3.9.ebuild b/games-emulation/advancemame/advancemame-3.9-r1.ebuild similarity index 78% rename from games-emulation/advancemame/advancemame-3.9.ebuild rename to games-emulation/advancemame/advancemame-3.9-r1.ebuild index 344e87abb787..ff19eda49ce8 100644 --- a/games-emulation/advancemame/advancemame-3.9.ebuild +++ b/games-emulation/advancemame/advancemame-3.9-r1.ebuild @@ -56,6 +56,17 @@ src_prepare() { } src_configure() { + # https://bugs.gentoo.org/858626 + # + # From upstream configure.ac, only enabled if CFLAGS is not set: + # - Code was written when compilers where not aggressively optimizing undefined behaviour about aliasing + # - Code was written when compilers where not aggressively optimizing undefined behaviour about overflow in signed integers + # - Code was written on Intel where char is signed + # + # Do not trust with LTO either, BTW + append-flags -fno-strict-aliasing -fno-strict-overflow -fsigned-char + filter-lto + # Fix for bug #78030 use ppc && append-ldflags "-Wl,--relax"