1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

cargo.bbclass: set up cargo environment in common do_compile

cargo_do_compile runs only if the recipe is built using cargo
as the top level tool. Some recipes hide usage of cargo inside setuptools
(or autoconf) and use do_compile definitions specific to those,
and so the environment isn't properly set up.

This was exposed by latest versions of python3-cryptography.

(From OE-Core rev: a3f566fcbfc02e0a3b3f6a676d6dde88a5b50506)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9f4ff643a028d7f5670d80861f2ce19ca2d90faa)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Alexander Kanavin
2023-06-25 23:22:25 +02:00
committed by Steve Sakoman
parent 1cdf86a68f
commit 598c3d25c6
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -49,7 +49,6 @@ oe_cargo_build () {
do_compile[progress] = "outof:\s+(\d+)/(\d+)"
cargo_do_compile () {
oe_cargo_fix_env
oe_cargo_build
}
+4
View File
@@ -101,6 +101,10 @@ cargo_common_do_configure () {
EOF
}
do_compile:prepend () {
oe_cargo_fix_env
}
oe_cargo_fix_env () {
export CC="${RUST_TARGET_CC}"
export CXX="${RUST_TARGET_CXX}"