Re: [PATCH] Documentation: kbuild: Update the debug information notes in reproducible-builds.rst
From: Nathan Chancellor
Date: Mon Mar 16 2026 - 18:02:48 EST
Hi Alex,
On Sat, Mar 14, 2026 at 09:44:31PM -0700, Alexander Coffin wrote:
> I finally got around to reviewing the reproducible builds again and I'm
> pretty sure it is supposed to be `-ffile-prefix-map` (not just
> `-fdebug-prefix-map`) with KCPPFLAGS to also handle macros, but I could be
> mistaken. I can try to build the kernel reproducibly again, but it has been
> a while since I did this (sorry).
Thanks a lot for taking a look! '-ffile-prefix-map' is the same as
'-fdebug-prefix-map' + '-fmacro-prefix-map' and the kernel already sets
the latter in Makefile (this documentation mentions that in the next
paragraph), so it is only necessary for someone to set the debug
variant.
We tried to add '-ffile-prefix-map' instead of just '-fmacro-prefix-map'
but it breaks quite a few things for the average developer so it had to
be reverted.
Cheers,
Nathan