mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Kees Cook <kees@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Julian Braha <julianbraha@gmail.com>,
	Lorenzo Stoakes <ljs@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] scripts/Kconfig.toolchain: Drop compiler symbols from dependencies
Date: Fri, 9 Oct 2026 10:41:17 +0200	[thread overview]
Message-ID: <asiorcpffrSJ6_cM@derry.ads.avm.de> (raw)
In-Reply-To: <202610082352.C92AC57@keescook>

On Thu, Oct 08, 2026 at 11:54:30PM -0700, Kees Cook wrote:
> On Wed, Oct 07, 2026 at 05:22:21PM +0200, Nathan Chancellor wrote:
> > Commit 454e00cf8ee5 ("kbuild: avoid re-running compiler and linker
> > probes") moved many cc-option calls from the main Makefile into Kconfig.
> > In the process, code such as
> > 
> >   ifdef CONFIG_CC_IS_GCC
> >   KBUILD_CFLAGS += $(call cc-option,-foo)
> >   endif
> > 
> > was converted into Kconfig as
> > 
> >   config CC_OPT_FOO
> >       def_string "$(cc-option-str,-foo)" if CC_IS_GCC
> > 
> > The 'if CC_IS_GCC' is generally unnecessary because it does not prevent
> > the cc-option-str call from running (which is the primary reason the
> > ifdef guards exists in the Makefile), as cc-option-str and the like are
> > run before Kconfig even parses the dependency. It only impacts the
> > symbol's visibility, which does not really matter in the general case,
> > so remove these dependencies.
> 
> Hm, does this mean we're running more probes at start-up now compared to
> before (since the Makefile idef would have suppressed them)?

Yes, probing compiler flags via Kconfig results in more
useless probing calls.  That's unfortunate, but the move to Kconfig look
still reasonable to me due.

-- 
Nicolas

  reply	other threads:[~2026-10-09  8:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 15:22 [PATCH 0/2] Initial ergonomic improvements to scripts/Kconfig.toolchain Nathan Chancellor
2026-10-07 15:22 ` [PATCH 1/2] scripts/Kconfig.toolchain: Drop compiler symbols from dependencies Nathan Chancellor
2026-10-09  6:54   ` Kees Cook
2026-10-09  8:41     ` Nicolas Schier [this message]
2026-10-09 19:22       ` Nathan Chancellor
2026-10-07 15:22 ` [PATCH 2/2] kconfig: Improve ergonomics around disabling warnings with cc-option Nathan Chancellor
2026-10-09  6:54   ` Kees Cook
2026-10-07 16:48 ` [PATCH 0/2] Initial ergonomic improvements to scripts/Kconfig.toolchain Nicolas Schier
2026-10-09  6:56   ` Kees Cook
2026-10-09 19:14     ` Nathan Chancellor
2026-10-09 19:43       ` Nicolas Schier
2026-10-09 20:27 ` 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=asiorcpffrSJ6_cM@derry.ads.avm.de \
    --to=nsc@kernel.org \
    --cc=julianbraha@gmail.com \
    --cc=kees@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=nathan@kernel.org \
    /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

all inboxes | Powered by JetHome®