From ff15377c5a378209436cbf2961ce76ba6526f070 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Sun, 24 Mar 2024 14:11:01 -0400 Subject: dev-util/mingw64-runtime: filter -Wl,-z,* ... for CFLAGS 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). Signed-off-by: Ionen Wolkens --- dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild | 5 +++++ 1 file changed, 5 insertions(+) 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 e6c64a8633a0..2fc28bcf8673 100644 --- a/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild +++ b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild @@ -60,6 +60,11 @@ src_configure() { fi local CHOST=${CTARGET} + # 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 -- cgit v1.2.3-65-gdbad