]> 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)
committerSteve Sakoman <steve@sakoman.com>
Fri, 20 Jan 2023 02:28:32 +0000 (16:28 -1000)
commit94939f608c6984e3a92999a384a03a35c2b34ed6
treed2e2f7ef399a0af2dd343f968f742bd7e8008c66
parent687f371fc99833b878f3cfdb006aca9e238d9909
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>
(cherry picked from commit 0c07089bdf7e0d7d8f37552db0bcd75f860979d9)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes-recipe/rust-common.bbclass
meta/classes-recipe/rust-target-config.bbclass