lkml.org 
[lkml]   [2021]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] kbuild: dummy-tools: adjust to scripts/cc-version.sh
From
Date
On 09. 03. 21, 17:25, Masahiro Yamada wrote:
> Commit aec6c60a01d3 ("kbuild: check the minimum compiler version in
> Kconfig") changed how the script detects the compiler version.
>
> Get 'make CROSS_COMPILE=scripts/dummy-tools/' back working again.
>
> Fixes: aec6c60a01d3 ("kbuild: check the minimum compiler version in Kconfig")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> Perhaps, Jiri may have already noticed this issue, and have a similar patch.
> I just checked ML, but I did not find a patch to fix this.

No, as I was making it work on 5.11 :).

BTW there is one remaining issue I came across:
config PAHOLE_HAS_SPLIT_BTF
def_bool $(success, test `$(PAHOLE) --version | sed -E
's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119")

and in Makefile we see:
PAHOLE = pahole

and not something like:
PAHOLE = $(CROSS_COMPILE)pahole

Any idea how to fix this?

> scripts/dummy-tools/gcc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc
> index 7b10332b23ba..39e65fee59bd 100755
> --- a/scripts/dummy-tools/gcc
> +++ b/scripts/dummy-tools/gcc
> @@ -57,9 +57,9 @@ if arg_contain --version "$@"; then
> fi
>
> if arg_contain -E "$@"; then
> - # For scripts/gcc-version.sh; This emulates GCC 20.0.0
> + # For scripts/cc-version.sh; This emulates GCC 20.0.0
> if arg_contain - "$@"; then
> - sed 's/^__GNUC__$/20/; s/^__GNUC_MINOR__$/0/; s/^__GNUC_PATCHLEVEL__$/0/'
> + sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}'
> exit 0
> else
> echo "no input files" >&2
>


--
js
suse labs

\
 
 \ /
  Last update: 2021-03-10 05:55    [W:0.221 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site