app-emulation/dxvk: filter -Wl,-z,* ... for C(XX)FLAGS

strip-unsupported-flags handles this fine in LDFLAGS, but -Wl,*
are no-ops during compile-only tests (thus not stripped) 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).

wrt bug #928038, this already been done a while ago for wine,
mingw64-runtime, and mingw64-toolchain itself and there *should*
have been only dxvk and vkd3d-proton left (now done).

Closes: https://bugs.gentoo.org/928038
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens 2024-03-28 06:05:56 -04:00
parent 2c034d2d17
commit 18bba14d15
No known key found for this signature in database
GPG Key ID: B24406B0B0AC4334
5 changed files with 25 additions and 0 deletions

View File

@ -84,6 +84,11 @@ src_configure() {
unset AR CC CXX RC STRIP
filter-flags '-fuse-ld=*'
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,*' #928038
fi
CHOST_amd64=x86_64-w64-mingw32

View File

@ -108,6 +108,11 @@ src_configure() {
unset AR CC CXX RC STRIP
filter-flags '-fuse-ld=*'
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,*' #928038
fi
CHOST_amd64=x86_64-w64-mingw32

View File

@ -111,6 +111,11 @@ src_configure() {
unset AR CC CXX RC STRIP
filter-flags '-fuse-ld=*'
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,*' #928038
fi
CHOST_amd64=x86_64-w64-mingw32

View File

@ -108,6 +108,11 @@ src_configure() {
unset AR CC CXX RC STRIP
filter-flags '-fuse-ld=*'
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,*' #928038
fi
CHOST_amd64=x86_64-w64-mingw32

View File

@ -111,6 +111,11 @@ src_configure() {
unset AR CC CXX RC STRIP
filter-flags '-fuse-ld=*'
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,*' #928038
fi
CHOST_amd64=x86_64-w64-mingw32