public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Alexander Coffin <alex@cyberialabs.net>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: KCFLAGS vs KCPPFLAGS for -fdebug-prefix-map
Date: Mon, 2 Mar 2026 15:29:14 -0700	[thread overview]
Message-ID: <20260302222914.GA3292653@ax162> (raw)
In-Reply-To: <b8dfe7035d19fd611b9be55ee3145fdb@purelymail.com>

Hi Alex,

On Sat, Feb 28, 2026 at 08:34:37PM -0800, Alexander Coffin wrote:
> From personally building the kernel a few months ago (reproducibly) one of
> the parts that was incorrect in the docs was that is says to use KCFLAGS
> when you should use KCPPFLAGS for the following. I had forgotten to report
> this until now and I'm not sure exactly what is expected to make a patch to
> the Kernel docs, so I am hoping someone else can do the probably one line
> fix (or maybe 2 if you count the other reference to KCFLAGS in the file).
> 
> > When the kernel is built out-of-tree, debug information may include
> > absolute filenames for the source files.  This must be overridden by
> > including the ``-fdebug-prefix-map`` option in the `KCFLAGS`_ variable.
> 
> from `Documentation/kbuild/reproducible-builds.rst`.

Thanks for bringing this up. I assume this is due to the debug
information generated in assembler files. While the KCPPFLAGS suggestion
works because it is included for both .c and .S compilation, I think it
would be more proper to recommend applying '-fdebug-prefix-map' to
KAFLAGS in addition to KCFLAGS to insure the flag is only added when
truly needed, just as a defensive measure against compiler and Kbuild
changes. I can send a patch for this later.

Cheers,
Nathan

      reply	other threads:[~2026-03-02 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01  4:34 KCFLAGS vs KCPPFLAGS for -fdebug-prefix-map Alexander Coffin
2026-03-02 22:29 ` Nathan Chancellor [this message]

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=20260302222914.GA3292653@ax162 \
    --to=nathan@kernel.org \
    --cc=alex@cyberialabs.net \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.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