media-radio/unixcw: fix build w/ qt-6.9 + LTO

Workaround for bug #957446#c16). Building via autotools requires a macro
like bitcoin or gpgme used in the past to ensure that -mno-direct-extern-access
is used if Qt itself was built with it.

The flag isn't in Qt's .pc files. It's easiest to just workaround this
with -fPIC, but in future, we might either have an eclass helper for this,
or just encourage people to use the m4 macro.

This refines the workaround from cebf7ed59e
as filtering LTO is a heavy hammer that we can avoid here. I hope to
come back to the ideas I mention above, though the priority of that depends
on how many others of these show up.

Closes: https://bugs.gentoo.org/957446
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-06-28 04:26:51 +01:00
parent 72b156d25c
commit d92f25030a

View File

@@ -37,8 +37,15 @@ src_prepare() {
}
src_configure() {
# fails with -flto (see bug #957446)
filter-lto
# Workaround for bug #957446#c16. Building via autotools requires a
# macro like bitcoin or gpgme used in the past to ensure that
# -mno-direct-extern-access is used if Qt itself was built with it.
# The flag isn't in Qt's .pc files. It's easiest to just workaround
# this with -fPIC, but in future, we might either have an eclass helper
# for this, or just encourage people to use the m4 macro.
append-flags -fPIC
append-ldflags -fPIC
econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
$(use_enable pulseaudio ) \
$(use_enable alsa ) \