Commit f9bc754b authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kbuild: dummy-tools: adjust to scripts/cc-version.sh



Commit aec6c60a ("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: aec6c60a ("kbuild: check the minimum compiler version in Kconfig")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
Acked-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent bf3c2551
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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