-fcanon-file-prefix and cc-rs compiler flag mixing
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 0 repliesNew
- v12 patches 8 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bitbake.conf, gcc toolchain: add -fcanon-prefix-map to map-prefixesmeta/ meta/ meta/ | +6 | 0 replies | |
| 2/2 | rust-common.bbclass: filter out incorrect compiler flags in wrappermeta/ | +21 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] -fcanon-file-prefix and cc-rs compiler flag mixing
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(-)