Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 27 Jun 2022 19:00:06
Message-Id: 1656356387.d2f2470d7a323a9a24a91b54f6c223c95f7fa2c1.floppym@gentoo
1 commit: d2f2470d7a323a9a24a91b54f6c223c95f7fa2c1
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 20:49:38 2022 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 27 18:59:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2f2470d
7
8 toolchain-funcs.eclass: set LC_ALL=C where appropriate
9
10 tc-ld-is-gold and tc-ld-is-lld check the output of ld --version.
11 This output may vary depending on the language selected by the user.
12 Set LC_ALL=C to force English output.
13
14 Bug: https://bugs.gentoo.org/854147
15 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
16
17 eclass/toolchain-funcs.eclass | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
21 index 54d4b0912a6e..17c075895d55 100644
22 --- a/eclass/toolchain-funcs.eclass
23 +++ b/eclass/toolchain-funcs.eclass
24 @@ -453,6 +453,9 @@ econf_build() {
25 tc-ld-is-gold() {
26 local out
27
28 + # Ensure ld output is in English.
29 + local -x LC_ALL=C
30 +
31 # First check the linker directly.
32 out=$($(tc-getLD "$@") --version 2>&1)
33 if [[ ${out} == *"GNU gold"* ]] ; then
34 @@ -483,6 +486,9 @@ tc-ld-is-gold() {
35 tc-ld-is-lld() {
36 local out
37
38 + # Ensure ld output is in English.
39 + local -x LC_ALL=C
40 +
41 # First check the linker directly.
42 out=$($(tc-getLD "$@") --version 2>&1)
43 if [[ ${out} == *"LLD"* ]] ; then