Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -22
+2 -2
Documentation/process/changes.rst
··· 33 33 Clang/LLVM (optional) 13.0.1 clang --version 34 34 Rust (optional) 1.78.0 rustc --version 35 35 bindgen (optional) 0.65.1 bindgen --version 36 - GNU make 3.82 make --version 36 + GNU make 4.0 make --version 37 37 bash 4.2 bash --version 38 38 binutils 2.25 ld -v 39 39 flex 2.5.35 flex --version ··· 111 111 Make 112 112 ---- 113 113 114 - You will need GNU make 3.82 or later to build the kernel. 114 + You will need GNU make 4.0 or later to build the kernel. 115 115 116 116 Bash 117 117 ----
+3 -19
Makefile
··· 11 11 # Comments in this file are targeted only to the developer, do not 12 12 # expect to learn how to build the kernel reading this file. 13 13 14 - ifeq ($(filter undefine,$(.FEATURES)),) 15 - $(error GNU Make >= 3.82 is required. Your Make version is $(MAKE_VERSION)) 14 + ifeq ($(filter output-sync,$(.FEATURES)),) 15 + $(error GNU Make >= 4.0 is required. Your Make version is $(MAKE_VERSION)) 16 16 endif 17 17 18 18 $(if $(filter __%, $(MAKECMDGOALS)), \ ··· 93 93 94 94 # If the user is running make -s (silent mode), suppress echoing of 95 95 # commands 96 - # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS. 97 - 98 - ifeq ($(filter 3.%,$(MAKE_VERSION)),) 99 - short-opts := $(firstword -$(MAKEFLAGS)) 100 - else 101 - short-opts := $(filter-out --%,$(MAKEFLAGS)) 102 - endif 103 - 104 - ifneq ($(findstring s,$(short-opts)),) 96 + ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),) 105 97 quiet=silent_ 106 98 override KBUILD_VERBOSE := 107 99 endif ··· 191 199 192 200 ifneq ($(words $(subst :, ,$(abs_srctree))), 1) 193 201 $(error source directory cannot contain spaces or colons) 194 - endif 195 - 196 - ifneq ($(filter 3.%,$(MAKE_VERSION)),) 197 - # 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x 198 - # We need to invoke sub-make to avoid implicit rules in the top Makefile. 199 - need-sub-make := 1 200 - # Cancel implicit rules for this Makefile. 201 - $(this-makefile): ; 202 202 endif 203 203 204 204 export sub_make_done := 1
+1 -1
scripts/Kbuild.include
··· 68 68 # Read a file, replacing newlines with spaces 69 69 # 70 70 # Make 4.2 or later can read a file by using its builtin function. 71 - ifneq ($(filter-out 3.% 4.0 4.1, $(MAKE_VERSION)),) 71 + ifneq ($(filter-out 4.0 4.1, $(MAKE_VERSION)),) 72 72 read-file = $(subst $(newline),$(space),$(file < $1)) 73 73 else 74 74 read-file = $(shell cat $1 2>/dev/null)