[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARA3uKsW_G+gnCX6dvSwgXWzqgZON7pc6gBWdw9gimq1A@mail.gmail.com>
Date: Thu, 4 Mar 2021 12:34:59 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Bernhard Rosenkränzer <bero@...dev.ch>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nathan Chancellor <natechancellor@...il.com>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH] Fix ld-version.sh script if LLD was built with LLD_VENDOR
On Thu, Mar 4, 2021 at 9:18 AM Bernhard Rosenkränzer <bero@...dev.ch> wrote:
>
> If LLD was built with -DLLD_VENDOR="xyz", ld.lld --version output
> will prefix LLD_VENDOR. Since LLD_VENDOR can contain spaces, the
> LLD identifier isn't guaranteed to be $2 either.
>
> Adjust the version checker to handle such versions of lld.
>
> Signed-off-by: Bernhard Rosenkränzer <bero@...dev.ch>
> ---
Bernhard,
Could you senv v2
with the suggested code change?
Please make sure to add
linux-kbuild@...r.kernel.org
in the To:
> scripts/ld-version.sh | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
> index a463273509b5..4c042a306e22 100755
> --- a/scripts/ld-version.sh
> +++ b/scripts/ld-version.sh
> @@ -49,6 +49,18 @@ elif [ "$1" = LLD ]; then
> min_version=$lld_min_version
> name=LLD
> disp_name=LLD
> +elif echo "$@" |grep -q ' LLD '; then
> + # if LLD was built with -DLLD_VENDOR="xyz", it ld.lld --version
> + # says "xyz LLD [...]". Since LLD_VENDOR may contain spaces, we
> + # don't know the exact position of "LLD" and the version info
> + # at this point
> + while [ "$1" != "LLD" ]; do
> + shift
> + done
> + version=$2
> + min_version=$lld_min_version
> + name=LLD
> + disp_name=LLD
> else
> echo "$orig_args: unknown linker" >&2
> exit 1
> --
> 2.30.1
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists