]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
rust: Do not use default compiler flags defined in CC crate
authorAnton Antonov <anton.antonov@arm.com>
Tue, 3 Jan 2023 14:36:39 +0000 (14:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Jan 2023 23:07:39 +0000 (23:07 +0000)
commit0c07089bdf7e0d7d8f37552db0bcd75f860979d9
treef2bf5001939b3046ad4cba73e554627549b311cd
parent5a38be49e451c9f9d973b10a33c3972507f7b18a
rust: Do not use default compiler flags defined in CC crate

Rust crates build dependecy C libraries using "CC" crate.
This crate adds some default compiler parameters depending on target arch.
For some targets these parameters conflict with the parameters defined by OE.

Warnings/errors like this can be seen in the case:

cc1: error: switch '-mcpu=cortex-a15' conflicts with switch '-march=armv7-a+fp' [-Werror]

Lets use only the OE parameters by exporting CRATE_CC_NO_DEFAULTS.
https://github.com/rust-lang/cc-rs#external-configuration-via-environment-variables

This patch fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=14947

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rust-common.bbclass
meta/classes-recipe/rust-target-config.bbclass