media-libs/urt: fix parallel, mark as LTO and strict-aliasing unsafe

Closes: https://bugs.gentoo.org/970475
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/643
Merges: https://codeberg.org/gentoo/gentoo/pulls/643
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Nicolas PARLANT
2026-04-16 08:36:36 +02:00
committed by Sam James
parent 3f973e7ad5
commit 11d759e19d
2 changed files with 24 additions and 1 deletions
@@ -0,0 +1,14 @@
see PR pending https://github.com/sarnold/urt/pull/14.patch
https://bugs.gentoo.org/970475
ensure buildlib (static) is built before buildshared
--- a/lib/makefile.src
+++ b/lib/makefile.src
@@ -75,7 +75,7 @@ install: buildlib
# Rebuild the library from all the .o files.
-buildshared: $(OBJS)
+buildshared: buildlib $(OBJS)
$(CC) ${CFLAGS} ${LDFLAGS} -o $(SHARED) $(OBJS) $(LIBS) -shared -Wl,-soname,$(SONAME)
ln -sf $(SHARED) $(LDNAME)
ln -sf $(SHARED) $(SONAME)
+10 -1
View File
@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -29,6 +29,9 @@ DEPEND="
"
PATCHES=(
"${FILESDIR}"/${PN}-3.2_rc1_p20250101-parallel.patch
# both merged
"${FILESDIR}"/${P}-respect-ldflags.patch
"${FILESDIR}"/${P}-ar.patch
)
@@ -44,6 +47,12 @@ src_prepare() {
}
src_configure() {
# -Werror=strict-aliasing
# https://github.com/sarnold/urt/issues/15
# Do not trust with LTO either.
append-flags -fno-strict-aliasing
filter-lto
append-cflags -fPIC
sed -i -e '/^CFLAGS/s: -O2 : :' makefile.hdr || die