History

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.

Masahiro Yamada committed 5 years ago

Commit f9bc7541 parent bf3c2551 file · +2 −2Browse files

Unified · Split

scripts/dummy-tools/gcc+2−2
@@ -57,9 +57,9 @@ if arg_contain --version "$@"; then · 56 unmodified lines
5757 fi
5858
5959 if arg_contain -E "$@"; then
60− # For scripts/gcc-version.sh; This emulates GCC 20.0.0
60+ # For scripts/cc-version.sh; This emulates GCC 20.0.0
6161 if arg_contain - "$@"; then
62− sed 's/^__GNUC__$/20/; s/^__GNUC_MINOR__$/0/; s/^__GNUC_PATCHLEVEL__$/0/'
62+ sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}'
6363 exit 0
6464 else
6565 echo "no input files" >&2