summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-05-17 22:35:09 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-05-20 16:01:46 -0400
commitd59f05977cf91d0873b7a91a84c2811ae60302ff (patch)
treea65ce92a71bdabe00ca29c48499a6be254317ade /app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild
parentapp-emulation/wine-vanilla: support building with mingw64-toolchain (diff)
downloadgentoo-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/wine-vanilla-7.7.ebuild')
-rw-r--r--app-emulation/wine-vanilla/wine-vanilla-7.7.ebuild6
1 files changed, 5 insertions, 1 deletions
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