• [gentoo-dev] [PATCH] toolchain-funcs.eclass: set LC_ALL=C where appropr

    From Mike Gilbert@21:1/5 to All on Fri Jun 24 23:00:02 2022
    tc-ld-is-gold and tc-ld-is-lld check the output of ld --version.
    This output may vary depending on the language selected by the user.
    Set LC_ALL=C to force English output.

    Bug: https://bugs.gentoo.org/854147
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    ---
    eclass/toolchain-funcs.eclass | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 54d4b0912a6..17c075895d5 100644
    --- a/eclass/toolchain-funcs.eclass
    +++ b/eclass/toolchain-funcs.eclass
    @@ -453,6 +453,9 @@ econf_build() {
    tc-ld-is-gold() {
    local out

    + # Ensure ld output is in English.
    + local -x LC_ALL=C
    +
    # First check the linker directly.
    out=$($(tc-getLD "$@") --version 2>&1)
    if [[ ${out} == *"GNU gold"* ]] ; then
    @@ -483,6 +486,9 @@ tc-ld-is-gold() {
    tc-ld-is-lld() {
    local out

    + # Ensure ld output is in English.
    + local -x LC_ALL=C
    +
    # First check the linker directly.
    out=$($(tc-getLD "$@") --version 2>&1)
    if [[ ${out} == *"LLD"* ]] ; then
    --
    2.36.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)