mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
kbuild: raise the minimum GNU Make requirement to 4.0
RHEL/CentOS 7, popular distributions that install GNU Make 3.82, reached EOM/EOL on June 30, 2024. While you may get extended support, it is a good time to raise the minimum GNU Make version. The new requirement, GNU Make 4.0, was released in October, 2013. I did not touch the Makefiles under tools/ because I do not know the requirements for building tools. I do not find any GNU Make version checks under tools/. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
712aba5543
commit
5f99665ee8
@ -33,7 +33,7 @@ GNU C 5.1 gcc --version
|
|||||||
Clang/LLVM (optional) 13.0.1 clang --version
|
Clang/LLVM (optional) 13.0.1 clang --version
|
||||||
Rust (optional) 1.78.0 rustc --version
|
Rust (optional) 1.78.0 rustc --version
|
||||||
bindgen (optional) 0.65.1 bindgen --version
|
bindgen (optional) 0.65.1 bindgen --version
|
||||||
GNU make 3.82 make --version
|
GNU make 4.0 make --version
|
||||||
bash 4.2 bash --version
|
bash 4.2 bash --version
|
||||||
binutils 2.25 ld -v
|
binutils 2.25 ld -v
|
||||||
flex 2.5.35 flex --version
|
flex 2.5.35 flex --version
|
||||||
@ -111,7 +111,7 @@ It depends on ``libclang``.
|
|||||||
Make
|
Make
|
||||||
----
|
----
|
||||||
|
|
||||||
You will need GNU make 3.82 or later to build the kernel.
|
You will need GNU make 4.0 or later to build the kernel.
|
||||||
|
|
||||||
Bash
|
Bash
|
||||||
----
|
----
|
||||||
|
22
Makefile
22
Makefile
@ -11,8 +11,8 @@ NAME = Baby Opossum Posse
|
|||||||
# Comments in this file are targeted only to the developer, do not
|
# Comments in this file are targeted only to the developer, do not
|
||||||
# expect to learn how to build the kernel reading this file.
|
# expect to learn how to build the kernel reading this file.
|
||||||
|
|
||||||
ifeq ($(filter undefine,$(.FEATURES)),)
|
ifeq ($(filter output-sync,$(.FEATURES)),)
|
||||||
$(error GNU Make >= 3.82 is required. Your Make version is $(MAKE_VERSION))
|
$(error GNU Make >= 4.0 is required. Your Make version is $(MAKE_VERSION))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(if $(filter __%, $(MAKECMDGOALS)), \
|
$(if $(filter __%, $(MAKECMDGOALS)), \
|
||||||
@ -93,15 +93,7 @@ endif
|
|||||||
|
|
||||||
# If the user is running make -s (silent mode), suppress echoing of
|
# If the user is running make -s (silent mode), suppress echoing of
|
||||||
# commands
|
# commands
|
||||||
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
|
ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),)
|
||||||
|
|
||||||
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
|
|
||||||
short-opts := $(firstword -$(MAKEFLAGS))
|
|
||||||
else
|
|
||||||
short-opts := $(filter-out --%,$(MAKEFLAGS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(findstring s,$(short-opts)),)
|
|
||||||
quiet=silent_
|
quiet=silent_
|
||||||
override KBUILD_VERBOSE :=
|
override KBUILD_VERBOSE :=
|
||||||
endif
|
endif
|
||||||
@ -201,14 +193,6 @@ ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
|
|||||||
$(error source directory cannot contain spaces or colons)
|
$(error source directory cannot contain spaces or colons)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter 3.%,$(MAKE_VERSION)),)
|
|
||||||
# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x
|
|
||||||
# We need to invoke sub-make to avoid implicit rules in the top Makefile.
|
|
||||||
need-sub-make := 1
|
|
||||||
# Cancel implicit rules for this Makefile.
|
|
||||||
$(this-makefile): ;
|
|
||||||
endif
|
|
||||||
|
|
||||||
export sub_make_done := 1
|
export sub_make_done := 1
|
||||||
|
|
||||||
endif # sub_make_done
|
endif # sub_make_done
|
||||||
|
@ -68,7 +68,7 @@ kbuild-file = $(or $(wildcard $(src)/Kbuild),$(src)/Makefile)
|
|||||||
# Read a file, replacing newlines with spaces
|
# Read a file, replacing newlines with spaces
|
||||||
#
|
#
|
||||||
# Make 4.2 or later can read a file by using its builtin function.
|
# Make 4.2 or later can read a file by using its builtin function.
|
||||||
ifneq ($(filter-out 3.% 4.0 4.1, $(MAKE_VERSION)),)
|
ifneq ($(filter-out 4.0 4.1, $(MAKE_VERSION)),)
|
||||||
read-file = $(subst $(newline),$(space),$(file < $1))
|
read-file = $(subst $(newline),$(space),$(file < $1))
|
||||||
else
|
else
|
||||||
read-file = $(shell cat $1 2>/dev/null)
|
read-file = $(shell cat $1 2>/dev/null)
|
||||||
|
Loading…
Reference in New Issue
Block a user