summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-03-24 14:31:03 -0400
committerIonen Wolkens <ionen@gentoo.org>2024-03-24 14:37:35 -0400
commit5f02566649d4a1e6dc602102add6cc2fccc52c4d (patch)
treee9b0194df529db23ce5b3cceaea32bc0d0c1acb1 /app-emulation
parentapp-emulation/wine-staging: filter -Wl,-z,* ... for CFLAGS (diff)
downloadgentoo-5f02566649d4a1e6dc602102add6cc2fccc52c4d.tar.gz
gentoo-5f02566649d4a1e6dc602102add6cc2fccc52c4d.tar.bz2
gentoo-5f02566649d4a1e6dc602102add6cc2fccc52c4d.zip
app-emulation/wine-proton: filter -Wl,-z,* ... for CFLAGS
test-flags-CC was not meant to test LDFLAGS and -Wl,* are no-ops at compile-time and thus don't get stripped even if they don't work (same happens when using strip-unsupported-flags) and then if a package compiles and links anything at same time it fails. This used not to be a big problem but now that 23.0 profiles do -Wl,-z,pack-relative-relocs (mingw ld has no -z) this is hitting bashrc-mv users that tend to do CFLAGS="${LDFLAGS}" by default. Tempting to ignore it because of how wrong it is, but well. An alternate route could be to eventually have strip-flags and/or strip-unsupported-flags remove -Wl,* from non-LDFLAGS given this could affect more than mingw (e.g. switching to bfd when there is a lld-only option). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/wine-proton/wine-proton-7.0.6.ebuild5
-rw-r--r--app-emulation/wine-proton/wine-proton-8.0.5c.ebuild5
-rw-r--r--app-emulation/wine-proton/wine-proton-8.0.9999.ebuild5
-rw-r--r--app-emulation/wine-proton/wine-proton-9.0.9999.ebuild6
4 files changed, 21 insertions, 0 deletions
diff --git a/app-emulation/wine-proton/wine-proton-7.0.6.ebuild b/app-emulation/wine-proton/wine-proton-7.0.6.ebuild
index b04f298e473a..50cc8ae8ca6c 100644
--- a/app-emulation/wine-proton/wine-proton-7.0.6.ebuild
+++ b/app-emulation/wine-proton/wine-proton-7.0.6.ebuild
@@ -279,6 +279,11 @@ src_configure() {
filter-flags '-fstack-protector*' #870136
filter-flags '-mfunction-return=thunk*' #878849
+ # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then
+ # strip-unsupported-flags miss these during compile-only tests
+ # (primarily done for 23.0 profiles' -z, not full coverage)
+ filter-flags '-Wl,-z,*'
+
# -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
diff --git a/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild b/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild
index 64e517a897ea..bb1944292c4d 100644
--- a/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild
+++ b/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild
@@ -292,6 +292,11 @@ src_configure() {
filter-flags '-fstack-protector*' #870136
filter-flags '-mfunction-return=thunk*' #878849
+ # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then
+ # strip-unsupported-flags miss these during compile-only tests
+ # (primarily done for 23.0 profiles' -z, not full coverage)
+ filter-flags '-Wl,-z,*'
+
# -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
diff --git a/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild b/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild
index a2711662b536..78b03242a34b 100644
--- a/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild
+++ b/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild
@@ -294,6 +294,11 @@ src_configure() {
filter-flags '-fstack-protector*' #870136
filter-flags '-mfunction-return=thunk*' #878849
+ # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then
+ # strip-unsupported-flags miss these during compile-only tests
+ # (primarily done for 23.0 profiles' -z, not full coverage)
+ filter-flags '-Wl,-z,*'
+
# -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
diff --git a/app-emulation/wine-proton/wine-proton-9.0.9999.ebuild b/app-emulation/wine-proton/wine-proton-9.0.9999.ebuild
index 42b55c99ed92..fda342d879f2 100644
--- a/app-emulation/wine-proton/wine-proton-9.0.9999.ebuild
+++ b/app-emulation/wine-proton/wine-proton-9.0.9999.ebuild
@@ -296,6 +296,12 @@ src_configure() {
CROSSCFLAGS="${CROSSCFLAGS:-$(
filter-flags '-fstack-protector*' #870136
filter-flags '-mfunction-return=thunk*' #878849
+
+ # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then
+ # strip-unsupported-flags miss these during compile-only tests
+ # (primarily done for 23.0 profiles' -z, not full coverage)
+ filter-flags '-Wl,-z,*'
+
CC=${mingwcc} test-flags-CC ${CFLAGS:--O2}
)}"