From patchwork Thu Jul 4 13:47:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13723781 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D02E1AB8EC; Thu, 4 Jul 2024 13:48:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100918; cv=none; b=cry5HKXkKdNkhxEE2RyXdYcOsOyomk2JZPVW2KZduaili6JbaPdXn2JDoDi99r+cJXAFszNAzncZxm8ppQ6l1ZhmQQ8dGZsr4tW9mnv7uHg48urerjZQb0Iuc8XRXrv6w8wU139IqsfFNdJdj4U5RQ3zef+/euU3YybwX3fhFzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100918; c=relaxed/simple; bh=ObGG99YV3Pwkwhl/5zKzk6upTQesHksgHPQdb/eaq0U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=b7McFux4/seEUf2bK9fa1PLhx9ffNWU6cEUetJDMrIqDBg9ZG/Hm+HKYiC4NhJFvUZcQAfIn4SKHJlJit7ylr8rEKjpx3qo0BxyO/enMgB0cyeMTdkbeVSvQq0JrCCKUkYugEo/Uq6yK5H9yLUpKo7phRh1yV7didq9YJd5fG1I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RNFV6lM/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RNFV6lM/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 113E8C3277B; Thu, 4 Jul 2024 13:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720100917; bh=ObGG99YV3Pwkwhl/5zKzk6upTQesHksgHPQdb/eaq0U=; h=From:To:Cc:Subject:Date:From; b=RNFV6lM/+XjGCHyW7HXZcQr8Y7KnLj3ltOXT/EZwhLf7xSdqGvJbX8fT6LMXYU471 rRGjzLjUSxmqhIY4r8XPofo9EfRYFhqwF5EFhsDD4da+/LAjAHXjZMmxqgpHJd8lj0 JqcIUsK2nLj5Shw1cQLkCKg0TwF0QUYAdbDYTaPz0R2OFr8jH/437hkYGCa3jIhZIm Jlj457BLquSwdxu8sy2Ph9icYgrAAJWFwfQ4F7z5brCKSxf0+5msmw0PgBRbi7y+RQ +x+3y4jLX40lu/cDXk7Gb8g3UhapytlcC1/4mP0DFBz78anQz2wA2N5mLpB+4q4VpW YSLAEmNHf1WkA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Jonathan Corbet , Nathan Chancellor , Nicolas Schier , linux-doc@vger.kernel.org, workflows@vger.kernel.org Subject: [PATCH 1/3] kbuild: raise the minimum GNU Make requirement to 4.0 Date: Thu, 4 Jul 2024 22:47:55 +0900 Message-ID: <20240704134812.1511315-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.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 Reviewed-by: Nathan Chancellor --- Documentation/process/changes.rst | 4 ++-- Makefile | 22 +++------------------- scripts/Kbuild.include | 2 +- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst index 5685d7bfe4d0..415ac8eeb46c 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -33,7 +33,7 @@ GNU C 5.1 gcc --version Clang/LLVM (optional) 13.0.1 clang --version Rust (optional) 1.78.0 rustc --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 binutils 2.25 ld -v flex 2.5.35 flex --version @@ -111,7 +111,7 @@ It depends on ``libclang``. 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 ---- diff --git a/Makefile b/Makefile index 06aa6402b385..c90d408c825e 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ NAME = Baby Opossum Posse # Comments in this file are targeted only to the developer, do not # expect to learn how to build the kernel reading this file. -ifeq ($(filter undefine,$(.FEATURES)),) -$(error GNU Make >= 3.82 is required. Your Make version is $(MAKE_VERSION)) +ifeq ($(filter output-sync,$(.FEATURES)),) +$(error GNU Make >= 4.0 is required. Your Make version is $(MAKE_VERSION)) endif $(if $(filter __%, $(MAKECMDGOALS)), \ @@ -93,15 +93,7 @@ endif # If the user is running make -s (silent mode), suppress echoing of # commands -# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS. - -ifeq ($(filter 3.%,$(MAKE_VERSION)),) -short-opts := $(firstword -$(MAKEFLAGS)) -else -short-opts := $(filter-out --%,$(MAKEFLAGS)) -endif - -ifneq ($(findstring s,$(short-opts)),) +ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),) quiet=silent_ override KBUILD_VERBOSE := endif @@ -201,14 +193,6 @@ ifneq ($(words $(subst :, ,$(abs_srctree))), 1) $(error source directory cannot contain spaces or colons) 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 endif # sub_make_done diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index faf37bafa3f8..ed8a7493524b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -68,7 +68,7 @@ kbuild-file = $(or $(wildcard $(src)/Kbuild),$(src)/Makefile) # Read a file, replacing newlines with spaces # # 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)) else read-file = $(shell cat $1 2>/dev/null) From patchwork Thu Jul 4 13:47:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13723782 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3673F1AED5E; Thu, 4 Jul 2024 13:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100920; cv=none; b=ejv/KKYu3QnNoP6H38trrDgc58zDMFfIlibA96aCQSanP+L3cdXFN7Nt12wFX/M4dSwzr9bcYEsfKWYwHfnGLYf5rv6fU7bDPDk5hvJ02CWfdMDBBkQbC5CZOpa9e7Nko21j76zUD1A6od6RE83a/gQdlxTflALmwTbepAYFjuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100920; c=relaxed/simple; bh=opXwWickx4rx1GhIoIovHA7DJlyCrscafcIg4XeWn80=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EVtLK+j7E256srb0AYVT2svQKEC3AGPwlunuJC0j7hWzrusMMyYu5Pt4NU5LQ6y0P/g8xdRXHy0J2E0CEdNTL2B9gRJ543pcrX6AbohpHSs2LlagQLpc+Z6h2fL2sgsoSoXRu7JUyvEOum89Tk7jx/SYeCWgUceydU7jnVUZb18= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CTHfL/JT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CTHfL/JT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B752C3277B; Thu, 4 Jul 2024 13:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720100920; bh=opXwWickx4rx1GhIoIovHA7DJlyCrscafcIg4XeWn80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CTHfL/JTYTnePjTUDvNywUILWSwRuGYy8TiZ+ug149TgDDqSlki/8yVw0Rc83t4lm IRHZrehsBDJVwQxXQiLHLhFdVvJ0tz+GYrsDxy+qhyiUk1/dG1ZCQ0NatcwtrbAGdm h8IM6l9vCIzyUwh9sMR8Le6FZDDidoway0n1/sZ7STlkpjKJQAu6VGiZTWO/KbyNAT V/HkhEvy4U3nQoiJtfDnnTZfjsmaGLjVfw0JnXRKQCsgQysrew2kwDhwCa/+0DRDHi dvyyiVXNf/2jwpNjjp08HPdyYAV5nnA3OPuAt0P7mCHm8TtQ6nk0cSyDIujvDe24sY R8fOU+2iBLm3g== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nicolas Schier Subject: [PATCH 2/3] modpost: remove self-definitions of R_ARM_* macros Date: Thu, 4 Jul 2024 22:47:56 +0900 Message-ID: <20240704134812.1511315-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240704134812.1511315-1-masahiroy@kernel.org> References: <20240704134812.1511315-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit f5983dab0ead ("modpost: define more R_ARM_* for old distributions") added self-definitions for the R_ARM_* macros to fix build errors on CentOS 7. RHEL/CentOS 7 were retired at the end of June. Remove all the R_ARM_* definitions (except for R_ARM_THM_CALL), which should be available in recent distributions. Glibc added most of R_ARM_* macros in 2013. [1] [1]: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=08cbd996d33114ca50644d060fbe3a08260430fb Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor --- scripts/mod/modpost.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 11731fc62140..e9aae1b7ff77 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1168,39 +1168,9 @@ static Elf_Addr addend_386_rel(uint32_t *location, unsigned int r_type) return (Elf_Addr)(-1); } -#ifndef R_ARM_CALL -#define R_ARM_CALL 28 -#endif -#ifndef R_ARM_JUMP24 -#define R_ARM_JUMP24 29 -#endif - #ifndef R_ARM_THM_CALL #define R_ARM_THM_CALL 10 #endif -#ifndef R_ARM_THM_JUMP24 -#define R_ARM_THM_JUMP24 30 -#endif - -#ifndef R_ARM_MOVW_ABS_NC -#define R_ARM_MOVW_ABS_NC 43 -#endif - -#ifndef R_ARM_MOVT_ABS -#define R_ARM_MOVT_ABS 44 -#endif - -#ifndef R_ARM_THM_MOVW_ABS_NC -#define R_ARM_THM_MOVW_ABS_NC 47 -#endif - -#ifndef R_ARM_THM_MOVT_ABS -#define R_ARM_THM_MOVT_ABS 48 -#endif - -#ifndef R_ARM_THM_JUMP19 -#define R_ARM_THM_JUMP19 51 -#endif static int32_t sign_extend32(int32_t value, int index) { From patchwork Thu Jul 4 13:47:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13723783 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB3611AEFE6; Thu, 4 Jul 2024 13:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100922; cv=none; b=ecTf57M48LC9tIHK5tOZCg6S9mK9Pe5S0co6VQAGBdZ0DabpWmckZDN1w+VIj1LidmvTBSE/5FGFlVWy99VYnLlI21DStZFWcU8wO5XISWs8sPFqyE4S2gM2oWSStYNV26Tjd4V/ogNSBT4QzKpTDIi2GLph0jn/sOX5sqPAUb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100922; c=relaxed/simple; bh=vZKpYpTh2JeJUK2HgtA2t0L6Ui24+o0AztKYIPhIvew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sUGlykCvpl1+XSF+1eiB5csMFbdXF71u1KuBfIx6boYfFjlA5nWJR5RubhJNYKGtpPMyz1f7a3grd9t6R6YDcd9SLxs93VNc8hdtCiZ39d0s8q1qkzm+ern48p7vfXvEMbD3tjTwI8gJBQVRP13Ut0KoWfhNHjJ3UMKcWE1Sz8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WCfMxJk/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WCfMxJk/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AECC4C3277B; Thu, 4 Jul 2024 13:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720100922; bh=vZKpYpTh2JeJUK2HgtA2t0L6Ui24+o0AztKYIPhIvew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WCfMxJk/sEb2DXwyz6hW0wloehiyjLbgYaOPYkRzX3dXNSrXxiUIjYbtMxXrUBTAG J5fT67v2ekEmsOcOe06K5YOaaN2oraC9hQdLrNi3Yp4hwJjgWBOAM+Wv5yLvqxVrza s6BIdJYP1bnNU11MPDzaWRjXaLqndhrMPECEJIu96gq3JPipv9g9uayCWGHynjmq/r fz078UO4Yiz1dYCg8OZ6T8d5GVfCAH6b5l4vg4OJi4x32f7hqesTdkAQ5Z/GICpmlc FaS7pwattr+BwOAhJnrYKn3NdTS9xRAlEyB7+sjFe3HqchAdtVhTZ1QeCAP0aYrQGC QlRlasIOu9E0Q== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nicolas Schier Subject: [PATCH 3/3] modpost: rename R_ARM_THM_CALL to R_ARM_THM_PC22 Date: Thu, 4 Jul 2024 22:47:57 +0900 Message-ID: <20240704134812.1511315-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240704134812.1511315-1-masahiroy@kernel.org> References: <20240704134812.1511315-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 R_ARM_THM_CALL does not exist in /usr/include/elf.h, which originates from the Glibc project. Instead, the following line exists: #define R_ARM_THM_PC22 10 /* PC relative 24 bit (Thumb32 BL). */ Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor --- scripts/mod/modpost.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index e9aae1b7ff77..3e5313ed6065 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1168,10 +1168,6 @@ static Elf_Addr addend_386_rel(uint32_t *location, unsigned int r_type) return (Elf_Addr)(-1); } -#ifndef R_ARM_THM_CALL -#define R_ARM_THM_CALL 10 -#endif - static int32_t sign_extend32(int32_t value, int index) { uint8_t shift = 31 - index; @@ -1232,7 +1228,7 @@ static Elf_Addr addend_arm_rel(void *loc, Elf_Sym *sym, unsigned int r_type) ((lower & 0x07ff) << 1), 20); return offset + sym->st_value + 4; - case R_ARM_THM_CALL: + case R_ARM_THM_PC22: case R_ARM_THM_JUMP24: /* * Encoding T4: