diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-05-17 22:43:45 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-05-20 16:01:46 -0400 |
commit | 075774ab73e00b549b9e166f2fd76e141503c55a (patch) | |
tree | 85075deab0f5110839a0ff5e8a90c9c865280858 /app-emulation | |
parent | app-emulation/wine-staging: support building with mingw64-toolchain (diff) | |
download | gentoo-075774ab73e00b549b9e166f2fd76e141503c55a.tar.gz gentoo-075774ab73e00b549b9e166f2fd76e141503c55a.tar.bz2 gentoo-075774ab73e00b549b9e166f2fd76e141503c55a.zip |
app-emulation/wine-staging: 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')
5 files changed, 25 insertions, 5 deletions
diff --git a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild index 5a8aa3f539f4..13ce77523323 100644 --- a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild @@ -359,7 +359,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-staging/wine-staging-7.6-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild index c814bc62907c..2e0e2a06247c 100644 --- a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild @@ -359,7 +359,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-staging/wine-staging-7.7.ebuild b/app-emulation/wine-staging/wine-staging-7.7.ebuild index c814bc62907c..2e0e2a06247c 100644 --- a/app-emulation/wine-staging/wine-staging-7.7.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.7.ebuild @@ -359,7 +359,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-staging/wine-staging-7.8.ebuild b/app-emulation/wine-staging/wine-staging-7.8.ebuild index a8f7b0e6ad1c..78a3e9fb8778 100644 --- a/app-emulation/wine-staging/wine-staging-7.8.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.8.ebuild @@ -357,7 +357,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-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild index a8f7b0e6ad1c..78a3e9fb8778 100644 --- a/app-emulation/wine-staging/wine-staging-9999.ebuild +++ b/app-emulation/wine-staging/wine-staging-9999.ebuild @@ -357,7 +357,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 |