summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-06-26 06:08:49 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-06-26 06:10:10 -0400
commitd3bc1d312399949cdeeb0ec41e106df04db93506 (patch)
treec4f279367f0045807387cec4968c4818916b07e0
parentdev-util/mingw64-toolchain: pass -mno-avx for mingw cross (diff)
downloadgentoo-d3bc1d312399949cdeeb0ec41e106df04db93506.tar.gz
gentoo-d3bc1d312399949cdeeb0ec41e106df04db93506.tar.bz2
gentoo-d3bc1d312399949cdeeb0ec41e106df04db93506.zip
dev-util/mingw64-runtime: pass -mno-avx for mingw cross
AVX issues with mingw-gcc aren't exactly new, e.g. https://bugs.winehq.org/show_bug.cgi?id=45289 Been known to cause issues with dxvk too, albeit unsure if that's still relevant as issues are scattered/lost. Newly, >=wine-8.10 is likely to crash doing anything at all 32bit if used -march=native (w/ avx) and 32bit (e.g. `WINEARCH=win32 winecfg`). Adding this to every packages using mingw as a precaution, not believed there is much to gain from keeping AVX given the fragility here. May revisit eventually with a newer GCC. Not known to have caused issues with this package in particular (unlike wine/dxvk), so skipping a slow rebuild revbump. Unlike other ebuilds, also bother doing tc-is-gcc given what's used is more up in the air for this ebuild. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild9
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild7
2 files changed, 15 insertions, 1 deletions
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild
index ffbdbd5e4ddd..dbbdbd2de31c 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -70,6 +70,13 @@ src_configure() {
filter-flags '-mfunction-return=thunk*' #878849
fi
local CHOST=${CTARGET}
+
+ # -mavx with mingw-gcc has a history of obscure issues and
+ # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
+ # crashes with -march=skylake >=wine-8.10, similar issues with
+ # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
+ tc-is-gcc && append-flags -mno-avx
+
strip-unsupported-flags
# Normally mingw64 does not use dynamic linker.
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild
index e9b21a93f78c..5e0b60934d20 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild
@@ -65,6 +65,13 @@ src_configure() {
filter-flags '-mfunction-return=thunk*' #878849
fi
local CHOST=${CTARGET}
+
+ # -mavx with mingw-gcc has a history of obscure issues and
+ # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
+ # crashes with -march=skylake >=wine-8.10, similar issues with
+ # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
+ tc-is-gcc && append-flags -mno-avx
+
strip-unsupported-flags
# Normally mingw64 does not use dynamic linker, but at configure time it