commit:     cb896a35b33c2d0448904001731419c49be66cf9
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 16 15:33:42 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Jul 16 16:56:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb896a35

dev-util/mingw64-runtime: filter -fuse-ld for mingw

flag-o-matic is looking at respecting -fuse-ld for test-flags-CCLD,
which is good but don't want this when doing the user-unexpected
switch to mingw toolchain (filtering feels more solid either way).

Users can use MINGW_BYPASS=1 if really need full control.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild | 4 +++-
 dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild  | 4 +++-
 dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild  | 4 +++-
 3 files changed, 9 insertions(+), 3 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 004d6be49356..d25b7c5a8cd2 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
@@ -61,8 +61,10 @@ src_configure() {
        MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it
 
        # likely cross-compiling from here, update toolchain variables
-       ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]] &&
+       if ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]]; then
                unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
+               filter-flags '-fuse-ld=*'
+       fi
        local CHOST=${CTARGET}
        strip-unsupported-flags
 

diff --git a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild 
b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild
index f8c49eccf6eb..44937f667232 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild
@@ -63,8 +63,10 @@ src_configure() {
        MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it
 
        # likely cross-compiling from here, update toolchain variables
-       ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]] &&
+       if ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]]; then
                unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
+               filter-flags '-fuse-ld=*'
+       fi
        local CHOST=${CTARGET}
        strip-unsupported-flags
 

diff --git a/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild 
b/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild
index 3a886c7ab13b..d0a25ce8f9c1 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild
@@ -61,8 +61,10 @@ src_configure() {
        MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it
 
        # likely cross-compiling from here, update toolchain variables
-       ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]] &&
+       if ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]]; then
                unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
+               filter-flags '-fuse-ld=*'
+       fi
        local CHOST=${CTARGET}
        strip-unsupported-flags
 

Reply via email to