]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
bitbake.conf: Switch prefix mapping to use -ffile-prefix-map
authorKhem Raj <raj.khem@gmail.com>
Mon, 21 Apr 2025 17:29:15 +0000 (10:29 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Apr 2025 08:17:20 +0000 (09:17 +0100)
commitff73fa7ef7666a6dbe34f15515bc3ab6e574c5b0
treec59ea7518e93484109960c361604d9071263901d
parenta85cccc80aa7e6d6a5850c2d730cba5e1cb60cb3
bitbake.conf: Switch prefix mapping to use -ffile-prefix-map

-ffile-prefix map is more comprehensive when it comes to reproducible
builds and its superset of all prefix-mapping options in compilers

This makes is cleaner and workable across gcc and clang, clang does not
support -fcanon-prefix-map and it has to be explicitly omitted when using
clang.

There are lambdas generated in templates by clang which still get the
absolute paths despite -fdebug-prefix-map, this helps with that as well.

nasm is an outlier and we have fixed it by adding -fdebug-prefix-map option
luckily we do not pass DEBUG_PREFIX_MAP to nasm, in all recipes which use
nasm either pass -fdebug-prefix-map explicitly to nasm or they rewrite it
to use nasm flags syntax.

We have discussed this in past [1]

[1] https://patchwork.yoctoproject.org/project/oe-core/patch/20230428032030.2047920-1-raj.khem@gmail.com/#10281

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jacob Kroon <jacob.kroon@gmail.com>
Cc: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-arch.bbclass
meta/conf/bitbake.conf
meta/lib/oe/package.py
meta/recipes-devtools/gcc/libgfortran.inc
meta/recipes-devtools/python/python3-maturin_1.8.3.bb
meta/recipes-devtools/rust/cargo_1.85.1.bb