1 |
tc-ld-is-gold and tc-ld-is-lld check the output of ld --version. |
2 |
This output may vary depending on the language selected by the user. |
3 |
Set LC_ALL=C to force English output. |
4 |
|
5 |
Bug: https://bugs.gentoo.org/854147 |
6 |
Signed-off-by: Mike Gilbert <floppym@g.o> |
7 |
--- |
8 |
eclass/toolchain-funcs.eclass | 6 ++++++ |
9 |
1 file changed, 6 insertions(+) |
10 |
|
11 |
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
12 |
index 54d4b0912a6..17c075895d5 100644 |
13 |
--- a/eclass/toolchain-funcs.eclass |
14 |
+++ b/eclass/toolchain-funcs.eclass |
15 |
@@ -453,6 +453,9 @@ econf_build() { |
16 |
tc-ld-is-gold() { |
17 |
local out |
18 |
|
19 |
+ # Ensure ld output is in English. |
20 |
+ local -x LC_ALL=C |
21 |
+ |
22 |
# First check the linker directly. |
23 |
out=$($(tc-getLD "$@") --version 2>&1) |
24 |
if [[ ${out} == *"GNU gold"* ]] ; then |
25 |
@@ -483,6 +486,9 @@ tc-ld-is-gold() { |
26 |
tc-ld-is-lld() { |
27 |
local out |
28 |
|
29 |
+ # Ensure ld output is in English. |
30 |
+ local -x LC_ALL=C |
31 |
+ |
32 |
# First check the linker directly. |
33 |
out=$($(tc-getLD "$@") --version 2>&1) |
34 |
if [[ ${out} == *"LLD"* ]] ; then |
35 |
-- |
36 |
2.36.1 |