diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-06-25 23:22:25 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-09-23 05:26:16 -1000 |
| commit | 598c3d25c6a5f3bffa9665d9bdb9862ad32d993e (patch) | |
| tree | 02a64f8b357a6c80849e704384d04c587e371fe7 /meta/classes/cargo_common.bbclass | |
| parent | 1cdf86a68f30924d4607e119ee82408e2fe3ae41 (diff) | |
| download | poky-598c3d25c6a5f3bffa9665d9bdb9862ad32d993e.tar.gz | |
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>
Diffstat (limited to 'meta/classes/cargo_common.bbclass')
| -rw-r--r-- | meta/classes/cargo_common.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass index 1e9d284b5d..c1bc142d85 100644 --- a/meta/classes/cargo_common.bbclass +++ b/meta/classes/cargo_common.bbclass | |||
| @@ -101,6 +101,10 @@ cargo_common_do_configure () { | |||
| 101 | EOF | 101 | EOF |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | do_compile:prepend () { | ||
| 105 | oe_cargo_fix_env | ||
| 106 | } | ||
| 107 | |||
| 104 | oe_cargo_fix_env () { | 108 | oe_cargo_fix_env () { |
| 105 | export CC="${RUST_TARGET_CC}" | 109 | export CC="${RUST_TARGET_CC}" |
| 106 | export CXX="${RUST_TARGET_CXX}" | 110 | export CXX="${RUST_TARGET_CXX}" |
