commit: f23efbbadbff2a4351697404d640681a6204f109 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Fri May 13 01:07:39 2022 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Fri May 13 02:44:28 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f23efbba
dev-util/mingw64-runtime: unset toolchain vars when cross-compiling i.e. it could be CC=x86_64-pc-linux-gnu-gcc / clang which is what's wanted for building tools, but after we need to discard that to switch to x86_64-w64-mingw32-gcc (unless CHOST is already mingw as it would be correct). Ideally would need a unified way to do this with override variables for users to specify the alternate toolchain variables. The -Wl,--hash-style=* filter is likely not necessary given strip-unsupported-flags already strip it, but if(?) CC was set it may possibly have messed with that -- albeit will keep it as a safety/informational. Closes: https://github.com/gentoo/gentoo/pull/25365 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 61ebf16b4393..d082ba67bbc6 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 @@ -57,7 +57,9 @@ src_configure() { MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it - # cross-compiling from here + # likely cross-compiling from here, update toolchain variables + ${MW_CROSS} && + unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP 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 cde42642c57b..7eaca692a9d3 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 @@ -59,7 +59,9 @@ src_configure() { MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it - # cross-compiling from here + # likely cross-compiling from here, update toolchain variables + ${MW_CROSS} && + unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP 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 61ebf16b4393..d082ba67bbc6 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 @@ -57,7 +57,9 @@ src_configure() { MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it - # cross-compiling from here + # likely cross-compiling from here, update toolchain variables + ${MW_CROSS} && + unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP local CHOST=${CTARGET} strip-unsupported-flags