From nobody Mon Feb 9 15:28:29 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 E683C350A29; Tue, 13 Jan 2026 07:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768289778; cv=none; b=JTp1NMWutWUD3RI270ttQVcW20vapS92SI6Oi9VzI+zVL4lsyiDWDhcBlMGEokhfmGru+CbKlGHih4GVg8niYkg4IsnTcNQQdi9kKT3WyLEhOx02twbmgQbBSvvkOtWf/1SlFsVvecp17SJdWyUuLJImnObRfWqpCC6pGuISORo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768289778; c=relaxed/simple; bh=Z/KpXmg2acLr6HY276d2km3DUkXuG6WTvI3ls6E5+UM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=KHYnIjKTRKw82N/KhgPbOKhyAhKlJmivaS3FRL2J7U2W1+FBAmoUPzGUGXwULNI/aoHIFqZ42rt0UyN8gOx2A29ehhn78HKyuaRCt0HhLqy947NvpxUosbaCAkUDHQD5lC9Fd71nhdzxLM2BeUPKI3yRLjRJhGp2AnXpY8tOWhE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=HiBTSDsG; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="HiBTSDsG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1768289401; bh=Z/KpXmg2acLr6HY276d2km3DUkXuG6WTvI3ls6E5+UM=; h=From:Date:Subject:To:Cc:From; b=HiBTSDsG4tYdLOhwWifV/krOuWGbDApgYRNjFxuB2C8yZzzuSZ8UseZ7BeZW82ggd QpYQ1FYDke/Uu81zpWXZPo9f3WFvp9VmFcRsXzBaGzziVyJ7uN5t9n+s2Ptqpg8uIY HnK8epg4qvggH+4iZW2h0/3lwxRwwpLp7ut0wUaY= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 13 Jan 2026 08:29:58 +0100 Subject: [PATCH] kbuild: Drop superfluous compiler option checks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-kbuild-cc-option-v1-1-011314a0f7f1@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/2WMTQqDMBBGrxJm3QEzOKbkKsVFTMY2VNQmKgXx7 g110UWX7/t5O2RJUTJYtUOSLeY4jQX0RYF/uPEuGENhoIqaSmuNz26NQ0DvcZqXMkbDRMbVzNw 3UG5zkj6+v8pbe3KS11rMyxn+xFb9aYdSoSYkMYZrCuzC1W4a2uP4AFO8dHKsAAAA X-Change-ID: 20260111-kbuild-cc-option-75227a4555f6 To: Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768289400; l=4526; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Z/KpXmg2acLr6HY276d2km3DUkXuG6WTvI3ls6E5+UM=; b=q4JS4Tlt1EoEvIDK+J1fJlpKoFWdE+x5GpHavmUusypSYb2aT3vAdEEFUxi0pGsAENNNRbLSy qDvazjqmt1pCoYrodvyEyneGva98srfosNzQR4vuEZye568T4ahMggj X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Many of the compiler option checks are not necessary anymore with the current supported versions of compilers. Remove them. Signed-off-by: Thomas Wei=C3=9Fschuh --- Makefile | 2 +- scripts/Makefile.warn | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index e404e4767944..232ea447ce5c 100644 --- a/Makefile +++ b/Makefile @@ -1102,7 +1102,7 @@ KBUILD_CFLAGS +=3D -fno-builtin-wcslen =20 # change __FILE__ to the relative path to the source directory ifdef building_out_of_srctree -KBUILD_CPPFLAGS +=3D $(call cc-option,-fmacro-prefix-map=3D$(srcroot)/=3D) +KBUILD_CPPFLAGS +=3D -fmacro-prefix-map=3D$(srcroot)/=3D endif =20 # include additional Makefiles when needed diff --git a/scripts/Makefile.warn b/scripts/Makefile.warn index 68e6fafcb80c..df2f63df6506 100644 --- a/scripts/Makefile.warn +++ b/scripts/Makefile.warn @@ -16,7 +16,7 @@ KBUILD_CFLAGS +=3D -Werror=3Dreturn-type KBUILD_CFLAGS +=3D -Werror=3Dstrict-prototypes KBUILD_CFLAGS +=3D -Wno-format-security KBUILD_CFLAGS +=3D -Wno-trigraphs -KBUILD_CFLAGS +=3D $(call cc-option, -Wno-frame-address) +KBUILD_CFLAGS +=3D -Wno-frame-address KBUILD_CFLAGS +=3D $(call cc-option, -Wno-address-of-packed-member) KBUILD_CFLAGS +=3D -Wmissing-declarations KBUILD_CFLAGS +=3D -Wmissing-prototypes @@ -72,7 +72,7 @@ KBUILD_CFLAGS +=3D -Wno-pointer-sign # In order to make sure new function cast mismatches are not introduced # in the kernel (to avoid tripping CFI checking), the kernel should be # globally built with -Wcast-function-type. -KBUILD_CFLAGS +=3D $(call cc-option, -Wcast-function-type) +KBUILD_CFLAGS +=3D -Wcast-function-type =20 # Currently, disable -Wstringop-overflow for GCC 11, globally. KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) +=3D $(call cc-option, -Wn= o-stringop-overflow) @@ -99,7 +99,7 @@ KBUILD_CFLAGS +=3D $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICI= T_FALLTHROUGH) KBUILD_CFLAGS +=3D -Werror=3Ddate-time =20 # enforce correct pointer usage -KBUILD_CFLAGS +=3D $(call cc-option,-Werror=3Dincompatible-pointer-types) +KBUILD_CFLAGS +=3D -Werror=3Dincompatible-pointer-types =20 # Require designated initializers for all marked structures KBUILD_CFLAGS +=3D $(call cc-option,-Werror=3Ddesignated-init) @@ -116,7 +116,7 @@ ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),) =20 KBUILD_CFLAGS +=3D -Wmissing-format-attribute KBUILD_CFLAGS +=3D -Wmissing-include-dirs -KBUILD_CFLAGS +=3D $(call cc-option, -Wunused-const-variable) +KBUILD_CFLAGS +=3D -Wunused-const-variable =20 KBUILD_CPPFLAGS +=3D -Wundef KBUILD_CPPFLAGS +=3D -DKBUILD_EXTRA_WARN1 @@ -125,12 +125,12 @@ else =20 # Some diagnostics enabled by default are noisy. # Suppress them by using -Wno... except for W=3D1. -KBUILD_CFLAGS +=3D $(call cc-option, -Wno-unused-but-set-variable) -KBUILD_CFLAGS +=3D $(call cc-option, -Wno-unused-const-variable) +KBUILD_CFLAGS +=3D -Wno-unused-but-set-variable +KBUILD_CFLAGS +=3D -Wno-unused-const-variable KBUILD_CFLAGS +=3D $(call cc-option, -Wno-packed-not-aligned) KBUILD_CFLAGS +=3D $(call cc-option, -Wno-format-overflow) ifdef CONFIG_CC_IS_GCC -KBUILD_CFLAGS +=3D $(call cc-option, -Wno-format-truncation) +KBUILD_CFLAGS +=3D -Wno-format-truncation endif KBUILD_CFLAGS +=3D $(call cc-option, -Wno-stringop-truncation) =20 @@ -145,14 +145,11 @@ KBUILD_CFLAGS +=3D -Wno-format # problematic. KBUILD_CFLAGS +=3D -Wformat-extra-args -Wformat-invalid-specifier KBUILD_CFLAGS +=3D -Wformat-zero-length -Wnonnull -# Requires clang-12+. -ifeq ($(call clang-min-version, 120000),y) KBUILD_CFLAGS +=3D -Wformat-insufficient-args endif -endif -KBUILD_CFLAGS +=3D $(call cc-option, -Wno-pointer-to-enum-cast) +KBUILD_CFLAGS +=3D -Wno-pointer-to-enum-cast KBUILD_CFLAGS +=3D -Wno-tautological-constant-out-of-range-compare -KBUILD_CFLAGS +=3D $(call cc-option, -Wno-unaligned-access) +KBUILD_CFLAGS +=3D -Wno-unaligned-access KBUILD_CFLAGS +=3D -Wno-enum-compare-conditional endif =20 @@ -166,7 +163,7 @@ ifneq ($(findstring 2, $(KBUILD_EXTRA_WARN)),) KBUILD_CFLAGS +=3D -Wdisabled-optimization KBUILD_CFLAGS +=3D -Wshadow KBUILD_CFLAGS +=3D $(call cc-option, -Wlogical-op) -KBUILD_CFLAGS +=3D $(call cc-option, -Wunused-macros) +KBUILD_CFLAGS +=3D -Wunused-macros =20 KBUILD_CPPFLAGS +=3D -DKBUILD_EXTRA_WARN2 =20 --- base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 change-id: 20260111-kbuild-cc-option-75227a4555f6 prerequisite-change-id: 20260111-kbuild-clang-12-2e77542d5ad8:v1 Best regards, --=20 Thomas Wei=C3=9Fschuh