diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-03-09 19:25:45 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-03-11 08:52:54 +0300 |
commit | f9bc754be475582e2cc44296f7de0aaedbdbefeb (patch) | |
tree | 36ef3c87d6bdc7479488f1bd6dbb208eead83b60 | |
parent | bf3c255150619b71badb328c4dab48401a7ed62d (diff) | |
download | linux-f9bc754be475582e2cc44296f7de0aaedbdbefeb.tar.xz |
kbuild: dummy-tools: adjust to scripts/cc-version.sh
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>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
-rwxr-xr-x | scripts/dummy-tools/gcc | 4 |
1 files 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 |