1 |
commit: f23efbbadbff2a4351697404d640681a6204f109 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 13 01:07:39 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 13 02:44:28 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f23efbba |
7 |
|
8 |
dev-util/mingw64-runtime: unset toolchain vars when cross-compiling |
9 |
|
10 |
i.e. it could be CC=x86_64-pc-linux-gnu-gcc / clang which is |
11 |
what's wanted for building tools, but after we need to discard |
12 |
that to switch to x86_64-w64-mingw32-gcc (unless CHOST is already |
13 |
mingw as it would be correct). |
14 |
|
15 |
Ideally would need a unified way to do this with override variables |
16 |
for users to specify the alternate toolchain variables. |
17 |
|
18 |
The -Wl,--hash-style=* filter is likely not necessary given |
19 |
strip-unsupported-flags already strip it, but if(?) CC was |
20 |
set it may possibly have messed with that -- albeit will keep |
21 |
it as a safety/informational. |
22 |
|
23 |
Closes: https://github.com/gentoo/gentoo/pull/25365 |
24 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
25 |
|
26 |
dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild | 4 +++- |
27 |
dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild | 4 +++- |
28 |
dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild | 4 +++- |
29 |
3 files changed, 9 insertions(+), 3 deletions(-) |
30 |
|
31 |
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 |
32 |
index 61ebf16b4393..d082ba67bbc6 100644 |
33 |
--- a/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild |
34 |
+++ b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild |
35 |
@@ -57,7 +57,9 @@ src_configure() { |
36 |
|
37 |
MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it |
38 |
|
39 |
- # cross-compiling from here |
40 |
+ # likely cross-compiling from here, update toolchain variables |
41 |
+ ${MW_CROSS} && |
42 |
+ unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP |
43 |
local CHOST=${CTARGET} |
44 |
strip-unsupported-flags |
45 |
|
46 |
|
47 |
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 |
48 |
index cde42642c57b..7eaca692a9d3 100644 |
49 |
--- a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild |
50 |
+++ b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild |
51 |
@@ -59,7 +59,9 @@ src_configure() { |
52 |
|
53 |
MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it |
54 |
|
55 |
- # cross-compiling from here |
56 |
+ # likely cross-compiling from here, update toolchain variables |
57 |
+ ${MW_CROSS} && |
58 |
+ unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP |
59 |
local CHOST=${CTARGET} |
60 |
strip-unsupported-flags |
61 |
|
62 |
|
63 |
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 |
64 |
index 61ebf16b4393..d082ba67bbc6 100644 |
65 |
--- a/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild |
66 |
+++ b/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild |
67 |
@@ -57,7 +57,9 @@ src_configure() { |
68 |
|
69 |
MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it |
70 |
|
71 |
- # cross-compiling from here |
72 |
+ # likely cross-compiling from here, update toolchain variables |
73 |
+ ${MW_CROSS} && |
74 |
+ unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP |
75 |
local CHOST=${CTARGET} |
76 |
strip-unsupported-flags |