From: Nicolas Schier <nsc@kernel.org>
To: Samuel Rowberry <sprowdev@gmail.com>
Cc: masahiroy@kernel.org, nathan@kernel.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kbuild: add GCC stability warning
Date: Sun, 29 Mar 2026 21:44:28 +0200 [thread overview]
Message-ID: <acmBHIotA4p50qJQ@levanger> (raw)
In-Reply-To: <20260329192139.475926-1-sprowdev@gmail.com>
Hi Samuel,
On Sun, Mar 29, 2026 at 01:21:39PM -0600, Samuel Rowberry wrote:
> Newer GCC versions are not fully compatible with the code.
> Adding a warning lets users know without getting in the way
> of setups where it is okay to use GCC 15 (or is needed.)
can you please elaborate, _why_ you state that gcc 15 is incompatible in
some ways?
>
> Signed-off-by: Samuel Rowberry <sprowdev@gmail.com>
> ---
> v2:
> - Fixed line wrapping in commit desc
>
> Makefile | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 02902bcae..361b5a509 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -720,6 +720,19 @@ endif
>
> export KBUILD_MODULES KBUILD_BUILTIN
>
> +# Version check on demand because configs can get stale
kbuild already warns on compiler changes between kernel and out-of-tree
module builds, cp. Makefile target 'prepare'.
> +# This check is GCC-only because that is standard
> +# and if someone is using a custom setup, then it is
> +# assumed that their setup works.
> +ifeq ($(KBUILD_BUILTIN)$(KBUILD_MODULES),11)
> +ifneq ($(findstring GCC,$(CC_VERSION_TEXT)),)
What about CONFIG_CC_IS_GCC ? Or ...
> +CURRENT_CC_VERSION := $(shell $(CC) -dumpversion | cut -d. -f1)
CONFIG_GCC_VERSION ?
> +ifeq ($(shell expr $(CURRENT_CC_VERSION) \>= 15),1)
ifeq ($(call gcc-min-version, $(CONFIG_GCC_VERSION)),y) ?
> +$(warning "GCC $(CURRENT_CC_VERSION) detected. Please use GCC 11, 12, or 13 for stability.")
Why do you leave out gcc-14 here?
Kind regards
--
Nicolas
next prev parent reply other threads:[~2026-03-29 20:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-29 19:21 [PATCH v2] kbuild: add GCC stability warning Samuel Rowberry
2026-03-29 19:44 ` Nicolas Schier [this message]
2026-03-30 5:43 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acmBHIotA4p50qJQ@levanger \
--to=nsc@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=sprowdev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox