Skip to content

Commit

Permalink
kbuild: dummy-tools: adjust to scripts/cc-version.sh
Browse files Browse the repository at this point in the history
Commit aec6c60 ("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: aec6c60 ("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>
  • Loading branch information
Masahiro Yamada committed Mar 11, 2021
1 parent bf3c255 commit f9bc754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/dummy-tools/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9bc754

Please sign in to comment.