mbox series

[0/4] kbuild: make all file references relative to source root

Message ID 20250313-kbuild-prefix-map-v1-0-38cea8448c5f@weissschuh.net (mailing list archive)
Headers show
Series kbuild: make all file references relative to source root | expand

Message

Thomas Weißschuh March 13, 2025, 3:59 p.m. UTC
-fmacro-prefix-map only affects __FILE__ and __BASE_FILE__.
Other references, for example in debug information, is not affected.
This makes handling of file references in the compiler output harder to
use and creates problems for reproducible builds.

Switch to -ffile-prefix map which affects all references.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (4):
      kbuild: make all file references relative to source root
      kbuild: doc: reproducible-builds: drop section "Absolute filenames"
      x86/boot: Switch to -ffile-prefix-map
      x86/boot/compressed: Switch to -ffile-prefix-map

 Documentation/kbuild/reproducible-builds.rst | 16 ----------------
 Makefile                                     |  2 +-
 arch/x86/boot/Makefile                       |  2 +-
 arch/x86/boot/compressed/Makefile            |  2 +-
 4 files changed, 3 insertions(+), 19 deletions(-)
---
base-commit: bc5431693696b3f928b0b7acf8d7a120127db7a4
change-id: 20250312-kbuild-prefix-map-5ae76c209e7a

Best regards,

Comments

Borislav Petkov March 15, 2025, 11:34 a.m. UTC | #1
On Thu, Mar 13, 2025 at 04:59:08PM +0100, Thomas Weißschuh wrote:
> -fmacro-prefix-map only affects __FILE__ and __BASE_FILE__.
> Other references, for example in debug information, is not affected.
> This makes handling of file references in the compiler output harder to
> use and creates problems for reproducible builds.
> 
> Switch to -ffile-prefix map which affects all references.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Thomas Weißschuh (4):
>       kbuild: make all file references relative to source root
>       kbuild: doc: reproducible-builds: drop section "Absolute filenames"
>       x86/boot: Switch to -ffile-prefix-map
>       x86/boot/compressed: Switch to -ffile-prefix-map

Btw, I don't see why those are 4 patches - it is a single logical change that
converts to this new compiler switch.

So why are they 4?

Masahiro, might as well merge them into one...

Thx.
Masahiro Yamada March 15, 2025, 12:02 p.m. UTC | #2
On Sat, Mar 15, 2025 at 8:34 PM Borislav Petkov <bp@alien8.de> wrote:
>
> On Thu, Mar 13, 2025 at 04:59:08PM +0100, Thomas Weißschuh wrote:
> > -fmacro-prefix-map only affects __FILE__ and __BASE_FILE__.
> > Other references, for example in debug information, is not affected.
> > This makes handling of file references in the compiler output harder to
> > use and creates problems for reproducible builds.
> >
> > Switch to -ffile-prefix map which affects all references.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> > Thomas Weißschuh (4):
> >       kbuild: make all file references relative to source root
> >       kbuild: doc: reproducible-builds: drop section "Absolute filenames"
> >       x86/boot: Switch to -ffile-prefix-map
> >       x86/boot/compressed: Switch to -ffile-prefix-map
>
> Btw, I don't see why those are 4 patches - it is a single logical change that
> converts to this new compiler switch.
>
> So why are they 4?

Good point.

>
> Masahiro, might as well merge them into one...

I'd like Thomas to submit a single patch.




--
Best Regards
Masahiro Yamada