From e24b3ffcf4216d819b52618b6f17ba7410d1d845 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 16 Mar 2021 01:12:55 +0900 Subject: kbuild: collect minimum tool versions into scripts/min-tool-version.sh The kernel build uses various tools, many of which are provided by the same software suite, for example, LLVM and Binutils. When you raise the minimum version of Clang/LLVM, you need to update clang_min_version in scripts/cc-version.sh and also lld_min_version in scripts/ld-version.sh. Kbuild can handle CC=clang and LD=ld.lld independently, but it does not make much sense to maintain their versions separately. Let's create a central place of minimum tool versions so you do not need to touch multiple files. scripts/min-tool-version.sh prints the minimum version of the given tool. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Miguel Ojeda Tested-by: Sedat Dilek --- scripts/min-tool-version.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 scripts/min-tool-version.sh (limited to 'scripts/min-tool-version.sh') diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh new file mode 100755 index 000000000000..d22cf91212b0 --- /dev/null +++ b/scripts/min-tool-version.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only +# +# Print the minimum supported version of the given tool. +# When you raise the minimum version, please update +# Documentation/process/changes.rst as well. + +set -e + +if [ $# != 1 ]; then + echo "Usage: $0 toolname" >&2 + exit 1 +fi + +case "$1" in +binutils) + echo 2.23.0 + ;; +gcc) + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 + # https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk + if [ "$SRCARCH" = arm64 ]; then + echo 5.1.0 + else + echo 4.9.0 + fi + ;; +icc) + # temporary + echo 16.0.3 + ;; +llvm) + echo 10.0.1 + ;; +*) + echo "$1: unknown tool" >&2 + exit 1 + ;; +esac -- cgit v1.2.3