Re: [PATCH] kbuild, rust: use -fremap-path-prefix to make paths relative
From: Masahiro Yamada
Date: Tue Mar 11 2025 - 07:04:36 EST
On Mon, Feb 17, 2025 at 10:23 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Mon, Feb 10, 2025 at 6:11 PM Thomas Weißschuh <linux@xxxxxxxxxxxxxx> wrote:
> >
> > Remap source path prefixes in all output, including compiler
> > diagnostics, debug information, macro expansions, etc.
>
> Hmm... We don't do all the cases in the C side -- the docs ask to use
> `KCFLAGS` when one wants to remove them in the debug info:
>
> https://docs.kernel.org/kbuild/reproducible-builds.html#absolute-filenames
>
> I am not sure if there is a reason not to cover all cases in C (Cc'ing Ben).
GCC manual mentions the below about the -fdebug-prefix-map=old=new
"It can also be used to change an absolute path to
a relative path by using . for new.
This can give more reproducible builds, which are location
independent, but may require an extra command to tell GDB
where to find the source files."
I guess "the extra command" might be a bit annoying.
--
Best Regards
Masahiro Yamada