commit: 72b156d25cbdc0b86d2c937368e722ad420f6ac1 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Jun 28 03:20:38 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jun 28 03:21:36 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72b156d2
x11-misc/spnavcfg: fix build w/ qt-6.9 (with LTO, at least) Workaround for bug #957962 (and 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. Bug: https://bugs.gentoo.org/957446 Closes: https://bugs.gentoo.org/957962 Signed-off-by: Sam James <sam <AT> gentoo.org> x11-misc/spnavcfg/spnavcfg-1.3.ebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/x11-misc/spnavcfg/spnavcfg-1.3.ebuild b/x11-misc/spnavcfg/spnavcfg-1.3.ebuild index 1b14d396544c..c8916b5094a2 100644 --- a/x11-misc/spnavcfg/spnavcfg-1.3.ebuild +++ b/x11-misc/spnavcfg/spnavcfg-1.3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit toolchain-funcs xdg-utils +inherit flag-o-matic toolchain-funcs xdg-utils DESCRIPTION="Qt-based GUI to configure a space navigator device" HOMEPAGE="https://spacenav.sourceforge.net/" @@ -22,6 +22,16 @@ RDEPEND="${COMMON_DEPEND} >=app-misc/spacenavd-1[X]" src_configure() { + # Workaround for bug #957962 (and 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 + # Note: Makefile uses $(add_cflags) inside $(CXXFLAGS) CFLAGS="${CFLAGS}" \ LDFLAGS="${LDFLAGS}" \
