[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=x9M_tRekZM83-wJLfJrE=w7vHzV-rkdSxPBsUrSfVkw@mail.gmail.com>
Date: Fri, 12 Mar 2021 11:43:24 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Bernhard Rosenkränzer <bero@...dev.ch>,
Nathan Chancellor <nathan@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: fix ld-version.sh to not be affected by locale
On Fri, Mar 12, 2021 at 11:38 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> ld-version.sh checks the output from $(LD) --version, but it has a
> problem on some locales.
>
> For example, in Italian:
>
> $ LC_MESSAGES=it_IT.UTF-8 ld --version | head -n 1
> ld di GNU (GNU Binutils for Debian) 2.35.2
>
> This makes ld-version.sh fail because it expects "GNU ld" for the
> BFD linker case.
>
> Add LC_ALL=C to override the user's locale.
>
> BTW, setting LC_MESSAGES=C (or LANG=C) is not enough because it is
> ineffective if LC_ALL is set on the user's environment.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=212105
> Reported-by: Marco Scardovi
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
Recensito-Da: Nick Desaulniers <ndesaulniers@...gle.com>
In realtĂ non parlo italiano, ma so come usare Google Translate.
> ---
>
> scripts/ld-version.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
> index 30debf78aa09..1bf3aadde9de 100755
> --- a/scripts/ld-version.sh
> +++ b/scripts/ld-version.sh
> @@ -29,7 +29,7 @@ orig_args="$@"
> # Get the first line of the --version output.
> IFS='
> '
> -set -- $("$@" --version)
> +set -- $(LC_ALL=C "$@" --version)
>
> # Split the line on spaces.
> IFS=' '
> --
> 2.27.0
>
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists