All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] -fcanon-file-prefix and cc-rs compiler flag mixing
@ 2025-11-20 12:19 Gyorgy Sarvari
  2025-11-20 12:19 ` [PATCH 1/2] bitbake.conf, gcc toolchain: add -fcanon-prefix-map to map-prefixes Gyorgy Sarvari
  2025-11-20 12:19 ` [PATCH 2/2] rust-common.bbclass: filter out incorrect compiler flags in wrapper Gyorgy Sarvari
  0 siblings, 2 replies; 11+ messages in thread
From: Gyorgy Sarvari @ 2025-11-20 12:19 UTC (permalink / raw)
  To: openembedded-core

These two commits are very losely related to each other.

Patch 1 adds -fcanon-prefix-map to the compiler flags, when it is applicable 
(when gcc >=13 is used). This helps with finding the correct debug sources 
for the -src package. Without this flag some recipes miss some source 
files from this package, and sometimes they miss all files. (E.g. sqlite, audiofile, librsvg)

Patch 2 tries to work around a bug (or at least unexpected behavior) in the cc-rs 
crate. 

This patch tries to recognize if there are any flags passed to the compiler that shouldn't be there.

How these patches are related: normally the *-prefix-map flags are only passed to cross-compiled 
targets. However the cc crate passes this flag to the native builds also (due to flag 
merging), and in case the host compiler is too old to recognize this flag, than the build fails.

Though I was able to build rust with both of these patches for both native and class targets,
I wasn't able to configure qemu to run in my docker env, and due to this I was unable
to verify if the selftests pass in an OS where gcc is older than v13.

While not mentioned explicitly, but especially with the 2nd patch I'm testing the waters,
it is an RFC also.

---

Gyorgy Sarvari (2):
  bitbake.conf, gcc toolchain: add -fcanon-prefix-map to map-prefixes
  rust-common.bbclass: filter out incorrect compiler flags in wrapper

 meta/classes-recipe/rust-common.bbclass   | 24 +++++++++++++++++++++++
 meta/classes/toolchain/gcc-native.bbclass |  3 +++
 meta/classes/toolchain/gcc.bbclass        |  2 ++
 meta/conf/bitbake.conf                    |  2 +-
 4 files changed, 30 insertions(+), 1 deletion(-)



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-11-21 11:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 12:19 [PATCH 0/2] -fcanon-file-prefix and cc-rs compiler flag mixing Gyorgy Sarvari
2025-11-20 12:19 ` [PATCH 1/2] bitbake.conf, gcc toolchain: add -fcanon-prefix-map to map-prefixes Gyorgy Sarvari
2025-11-20 20:28   ` [OE-core] " Khem Raj
2025-11-20 22:48   ` Richard Purdie
2025-11-20 22:58     ` Khem Raj
2025-11-21  8:30     ` Gyorgy Sarvari
2025-11-21  8:57       ` Martin Jansa
2025-11-20 12:19 ` [PATCH 2/2] rust-common.bbclass: filter out incorrect compiler flags in wrapper Gyorgy Sarvari
2025-11-21  9:17   ` [OE-core] " Mathieu Dubois-Briand
2025-11-21 10:51     ` Gyorgy Sarvari
2025-11-21 11:47       ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.