diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-05-17 22:35:09 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-05-20 16:01:46 -0400 |
commit | d59f05977cf91d0873b7a91a84c2811ae60302ff (patch) | |
tree | a65ce92a71bdabe00ca29c48499a6be254317ade /app-emulation/wine-vanilla | |
parent | app-emulation/wine-vanilla: support building with mingw64-toolchain (diff) | |
download | gentoo-d59f05977cf91d0873b7a91a84c2811ae60302ff.tar.gz gentoo-d59f05977cf91d0873b7a91a84c2811ae60302ff.tar.bz2 gentoo-d59f05977cf91d0873b7a91a84c2811ae60302ff.zip |
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@gentoo.org>
Diffstat (limited to 'app-emulation/wine-vanilla')
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 |