games-simulation/micropolis: mark as LTO-unsafe, strict-aliasing unsafe

Closes: https://bugs.gentoo.org/859223
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Eli Schwartz
2024-03-25 20:27:42 -04:00
committed by Sam James
parent ee1faf9102
commit ef5b901aea

View File

@@ -3,7 +3,7 @@
EAPI=7
inherit desktop toolchain-funcs wrapper
inherit desktop flag-o-matic toolchain-funcs wrapper
COMMIT="6f873e16d6a1a8f6f59c1e5a75ec5f52ce5c89b6"
DESCRIPTION="Free version of the well-known city building simulation"
@@ -33,6 +33,14 @@ PATCHES=( "${FILESDIR}/micropolis-fix-clang15.diff" )
src_prepare() {
default
# -Werror=strict-aliasing
# https://bugs.gentoo.org/859223
# https://gitlab.com/stargo/micropolis/-/issues/1
#
# Do not trust with LTO either.
append-flags -fno-strict-aliasing
filter-lto
sed -i -e "s|-O3|${CFLAGS}|" \
src/tclx/config.mk src/{sim,tcl,tk}/makefile || die
sed -i -e "s|XLDFLAGS=|&${LDFLAGS}|" \