After this change (using RUST_HOST_SYS instead of HOST_SYS):
https://github.com/yoctoproject/poky/commit/5c45b73c8fa445b5192bb9fac1bc80b038b44c0d builds of parsec-service recipe for qemuarm machine started to fail:
cc1: error: switch '-mcpu=cortex-a15' conflicts with switch '-march=armv7-a+fp' [-Werror]
The problem is that some Rust crates build dependency C libraries using "cc-rs" crate.
This crate adds some compiler parameters depending on target “arch” and for “armv7" these parameters conflicts with compiler parameter defined by Yocto via TUNE_CCARGS:
https://github.com/rust-lang/cc-rs/blob/53fb72c87e5769a299f1886ead831901b9c775d6/src/lib.rs#L1700We noticed it with qemuarm, but there might be other conflicts as well. (If
-Werror is used then builds would fail, otherwise it would be just a warning which is easy to miss)
https://github.com/rust-lang/cc-rs#external-configuration-via-environment-variables So, my questions is: shouldn’t “CRATE_CC_NO_DEFAULTS” be defined in the Rust bbclass instead of expecting that owners of all Rust apps recipes would be aware about this issue for some machines and would add workarounds in their recipes?