commit: d59f05977cf91d0873b7a91a84c2811ae60302ff Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Wed May 18 02:35:09 2022 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Fri May 20 20:01:46 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d59f0597
app-emulation/wine-vanilla: improve cross *FLAGS handling Given wine will switch compiler, need to ensure unsupported flags were stripped so that e.g. clang-specific flags won't cause a build failure. strip-unsupported-flags doesn't act on CROSSCFLAGS, so use test-* directly. Using := assignment so that users can override. Additionally allowing LDFLAGS, there's not much to gain from it but as long as unsupported is stripped it should cause no issues. Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> app-emulation/wine-vanilla/wine-vanilla-6.0.2.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-7.0-r2.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-7.0.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-7.5-r1.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-7.6-r1.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-7.8.ebuild | 6 +++++- app-emulation/wine-vanilla/wine-vanilla-9999.ebuild | 6 +++++- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/app-emulation/wine-vanilla/wine-vanilla-6.0.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-6.0.2.ebuild index 9810db168765..807ee258f16e 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-6.0.2.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-6.0.2.ebuild @@ -305,7 +305,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${EPREFIX}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.0-r2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.0-r2.ebuild index 1992efdf9908..65ad27032112 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.0-r2.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.0-r2.ebuild @@ -296,7 +296,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.0.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.0.ebuild index 74051ef469f0..d1b64ae6c268 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.0.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.0.ebuild @@ -295,7 +295,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${EPREFIX}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.5-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.5-r1.ebuild index e6242d06fb43..0d667bb08b98 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.5-r1.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.5-r1.ebuild @@ -297,7 +297,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.6-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.6-r1.ebuild index b0609a8bff36..c097218912e6 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.6-r1.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.6-r1.ebuild @@ -296,7 +296,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild index b0609a8bff36..c097218912e6 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild @@ -296,7 +296,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.8.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.8.ebuild index 25c7af87ecba..6793bf6d1852 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.8.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.8.ebuild @@ -294,7 +294,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure diff --git a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild index 25c7af87ecba..6793bf6d1852 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild @@ -294,7 +294,11 @@ src_configure() { if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - export CROSSCFLAGS="${CFLAGS}" + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" + export CROSS{C,LD}FLAGS fi multilib-minimal_src_configure