diff options
author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2021-08-10 13:52:19 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-26 22:09:43 +0100 |
commit | 61e1570c6a09c1984e919e8c0a82a74c1a08d821 (patch) | |
tree | accab4b08aa3c62f098c9bb19399efb46906256a /meta/recipes-devtools/cargo | |
parent | 705b1d757fa221614f4f72cabf0fac5884cb6bfd (diff) | |
download | poky-61e1570c6a09c1984e919e8c0a82a74c1a08d821.tar.gz |
rust: initial merge of most of meta-rust
In the meta-rust repo at commit:
448047c Upgrade to 1.54.0 (#359)
Make the required directories:
mkdir ../oe-core/meta/recipes-devtools/rust
mkdir ../oe-core/meta/recipes-devtools/cargo
mkdir ../oe-core/meta/recipes-example
and then:
cp recipes-devtools/rust/* ../oe-core/meta/recipes-devtools/rust
cp recipes-devtools/cargo/* ../oe-core/meta/recipes-devtools/cargo
cp lib/crate.py ../oe-core/meta/lib
cp recipes-example/* ../oe-core/meta/recipes-example
cp conf/distro/include/rust_* ../oe-core/meta/conf/distro/include/
cp classes/* ../oe-core/meta/classes/
cp recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb ../oe-core/meta/recipes-core/packagegroups
(From OE-Core rev: 3ed57578cca93ff1ba4e0bf3f25566e10659a2f9)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/cargo')
9 files changed, 286 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cargo/cargo-1.51.0/0001-Disable-http2.patch b/meta/recipes-devtools/cargo/cargo-1.51.0/0001-Disable-http2.patch new file mode 100644 index 0000000000..9d47c9beb5 --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo-1.51.0/0001-Disable-http2.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 9844e63845da6cdafa485ad1ad3c99eaaa80312d Mon Sep 17 00:00:00 2001 | ||
2 | From: Johan Anderholm <johan.anderholm@gmail.com> | ||
3 | Date: Sun, 27 Jan 2019 10:19:00 +0100 | ||
4 | Subject: [PATCH] Disable http2 | ||
5 | |||
6 | http2 requires that curl is build with nghttp2 which in turn depends on | ||
7 | many dependencies and ultimately a dependency loop in the case of | ||
8 | curl-native. As long as multiplexing is disabled in cargo this should | ||
9 | be fine. | ||
10 | |||
11 | Upstream-Status: Inappropriate | ||
12 | --- | ||
13 | Cargo.toml | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/Cargo.toml b/Cargo.toml | ||
17 | index 8a144a4..c4f856e 100644 | ||
18 | --- a/Cargo.toml | ||
19 | +++ b/Cargo.toml | ||
20 | @@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" } | ||
21 | crates-io = { path = "crates/crates-io", version = "0.33.0" } | ||
22 | crossbeam-utils = "0.8" | ||
23 | crypto-hash = "0.3.1" | ||
24 | -curl = { version = "0.4.23", features = ["http2"] } | ||
25 | +curl = { version = "0.4.23" } | ||
26 | curl-sys = "0.4.22" | ||
27 | env_logger = "0.8.1" | ||
28 | pretty_env_logger = { version = "0.4", optional = true } | ||
diff --git a/meta/recipes-devtools/cargo/cargo-1.51.0/riscv-march.patch b/meta/recipes-devtools/cargo/cargo-1.51.0/riscv-march.patch new file mode 100644 index 0000000000..a10b3a4d93 --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo-1.51.0/riscv-march.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | Add suppor for riscv64 and riscv32 musl targets | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | --- a/vendor/cc/src/lib.rs | ||
7 | +++ b/vendor/cc/src/lib.rs | ||
8 | @@ -2361,6 +2361,7 @@ impl Build { | ||
9 | "riscv-none-embed", | ||
10 | ]), | ||
11 | "riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"), | ||
12 | + "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"), | ||
13 | "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"), | ||
14 | "sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"), | ||
15 | "sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"), | ||
16 | --- a/compiler/rustc_target/src/spec/mod.rs | ||
17 | +++ b/compiler/rustc_target/src/spec/mod.rs | ||
18 | @@ -641,9 +641,11 @@ supported_targets! { | ||
19 | ("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf), | ||
20 | ("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf), | ||
21 | ("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu), | ||
22 | + ("riscv32gc-unknown-linux-musl", riscv32gc_unknown_linux_musl), | ||
23 | ("riscv64imac-unknown-none-elf", riscv64imac_unknown_none_elf), | ||
24 | ("riscv64gc-unknown-none-elf", riscv64gc_unknown_none_elf), | ||
25 | ("riscv64gc-unknown-linux-gnu", riscv64gc_unknown_linux_gnu), | ||
26 | + ("riscv64gc-unknown-linux-musl", riscv64gc_unknown_linux_musl), | ||
27 | |||
28 | ("aarch64-unknown-none", aarch64_unknown_none), | ||
29 | ("aarch64-unknown-none-softfloat", aarch64_unknown_none_softfloat), | ||
30 | --- /dev/null | ||
31 | +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs | ||
32 | @@ -0,0 +1,19 @@ | ||
33 | +use crate::spec::{CodeModel, Target, TargetOptions}; | ||
34 | + | ||
35 | +pub fn target() -> Target { | ||
36 | + Target { | ||
37 | + llvm_target: "riscv32-unknown-linux-musl".to_string(), | ||
38 | + pointer_width: 32, | ||
39 | + data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), | ||
40 | + arch: "riscv32".to_string(), | ||
41 | + options: TargetOptions { | ||
42 | + unsupported_abis: super::riscv_base::unsupported_abis(), | ||
43 | + code_model: Some(CodeModel::Medium), | ||
44 | + cpu: "generic-rv32".to_string(), | ||
45 | + features: "+m,+a,+f,+d,+c".to_string(), | ||
46 | + llvm_abiname: "ilp32d".to_string(), | ||
47 | + max_atomic_width: Some(32), | ||
48 | + ..super::linux_musl_base::opts() | ||
49 | + }, | ||
50 | + } | ||
51 | +} | ||
52 | --- /dev/null | ||
53 | +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs | ||
54 | @@ -0,0 +1,19 @@ | ||
55 | +use crate::spec::{CodeModel, Target, TargetOptions}; | ||
56 | + | ||
57 | +pub fn target() -> Target { | ||
58 | + Target { | ||
59 | + llvm_target: "riscv64-unknown-linux-musl".to_string(), | ||
60 | + pointer_width: 64, | ||
61 | + data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), | ||
62 | + arch: "riscv64".to_string(), | ||
63 | + options: TargetOptions { | ||
64 | + unsupported_abis: super::riscv_base::unsupported_abis(), | ||
65 | + code_model: Some(CodeModel::Medium), | ||
66 | + cpu: "generic-rv64".to_string(), | ||
67 | + features: "+m,+a,+f,+d,+c".to_string(), | ||
68 | + llvm_abiname: "lp64d".to_string(), | ||
69 | + max_atomic_width: Some(64), | ||
70 | + ..super::linux_musl_base::opts() | ||
71 | + }, | ||
72 | + } | ||
73 | +} | ||
diff --git a/meta/recipes-devtools/cargo/cargo-1.51.0/rv64gc.patch b/meta/recipes-devtools/cargo/cargo-1.51.0/rv64gc.patch new file mode 100644 index 0000000000..aab1e18453 --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo-1.51.0/rv64gc.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | --- a/vendor/cc-1.0.60/.cargo-checksum.json | ||
2 | +++ b/vendor/cc-1.0.60/.cargo-checksum.json | ||
3 | @@ -1 +1 @@ | ||
4 | -{"files":{"Cargo.lock":"30b9e23f97015aea3eed3e17c6d76d565c2924efec8bdae64c899080847afe89","Cargo.toml":"f6f22b69df3df57c58373cdee72b22218ffa030bc375b36632660037dd72c866","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"51405d284d2e0620db62c655c652fc0ec84f20c1cb30529227355c9575a9e6dd","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"903c5f2f5dd0cc7d04f99f605a95e6abde8b38156fd4e73eefc58493f55a4e5a","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"52afe8554f577c87841c48ddee3ba7ffe70a00129e1d6eeb2ec0efb3d2b9aa11","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"16274867f23871e9b07614eda4c7344da13d1751fed63d4f633857e40be86394","tests/test.rs":"65c073e0e2cf4aa0433066102788e9f57442719e6f32f5ad5248aa7132bb4597"},"package":"ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"} | ||
5 | \ No newline at end of file | ||
6 | +{"files":{"Cargo.lock":"30b9e23f97015aea3eed3e17c6d76d565c2924efec8bdae64c899080847afe89","Cargo.toml":"f6f22b69df3df57c58373cdee72b22218ffa030bc375b36632660037dd72c866","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"51405d284d2e0620db62c655c652fc0ec84f20c1cb30529227355c9575a9e6dd","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"2788af2bdf425f267b33bc524f3e627851b52422e38f480a7e39eb834264fd73","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"52afe8554f577c87841c48ddee3ba7ffe70a00129e1d6eeb2ec0efb3d2b9aa11","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"16274867f23871e9b07614eda4c7344da13d1751fed63d4f633857e40be86394","tests/test.rs":"65c073e0e2cf4aa0433066102788e9f57442719e6f32f5ad5248aa7132bb4597"},"package":"ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"} | ||
7 | --- a/vendor/cc-1.0.60/src/lib.rs | ||
8 | +++ b/vendor/cc-1.0.60/src/lib.rs | ||
9 | @@ -1639,14 +1639,17 @@ impl Build { | ||
10 | let mut parts = target.split('-'); | ||
11 | if let Some(arch) = parts.next() { | ||
12 | let arch = &arch[5..]; | ||
13 | - cmd.args.push(("-march=rv".to_owned() + arch).into()); | ||
14 | if target.contains("linux") && arch.starts_with("64") { | ||
15 | + cmd.args.push(("-march=rv64gc").into()); | ||
16 | cmd.args.push("-mabi=lp64d".into()); | ||
17 | } else if target.contains("linux") && arch.starts_with("32") { | ||
18 | + cmd.args.push(("-march=rv32gc").into()); | ||
19 | cmd.args.push("-mabi=ilp32d".into()); | ||
20 | } else if arch.starts_with("64") { | ||
21 | + cmd.args.push(("-march=rv".to_owned() + arch).into()); | ||
22 | cmd.args.push("-mabi=lp64".into()); | ||
23 | } else { | ||
24 | + cmd.args.push(("-march=rv".to_owned() + arch).into()); | ||
25 | cmd.args.push("-mabi=ilp32".into()); | ||
26 | } | ||
27 | cmd.args.push("-mcmodel=medany".into()); | ||
28 | @@ -2332,6 +2335,9 @@ impl Build { | ||
29 | "riscv-none-embed", | ||
30 | ]), | ||
31 | "riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"), | ||
32 | + "riscv32gc-unknown-linux-gnu" => Some("riscv32-linux-gnu"), | ||
33 | + "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"), | ||
34 | + "riscv32gc-unknown-linux-musl" => Some("riscv32-linux-musl"), | ||
35 | "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"), | ||
36 | "sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"), | ||
37 | "sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"), | ||
diff --git a/meta/recipes-devtools/cargo/cargo-cross-canadian.inc b/meta/recipes-devtools/cargo/cargo-cross-canadian.inc new file mode 100644 index 0000000000..840793c50b --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo-cross-canadian.inc | |||
@@ -0,0 +1,74 @@ | |||
1 | SUMMARY = "Cargo, a package manager for Rust cross canadian flavor." | ||
2 | |||
3 | RUST_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config" | ||
4 | |||
5 | HOST_SYS = "${HOST_ARCH}-unknown-linux-gnu" | ||
6 | CARGO_RUST_TARGET_CCLD = "${RUST_BUILD_CCLD}" | ||
7 | |||
8 | require recipes-devtools/rust/rust-common.inc | ||
9 | require cargo.inc | ||
10 | |||
11 | CARGO = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo" | ||
12 | BASEDEPENDS:remove = "cargo-native" | ||
13 | |||
14 | export RUST_TARGET_PATH="${WORKDIR}/targets/" | ||
15 | |||
16 | RUSTLIB = " \ | ||
17 | -L ${STAGING_DIR_NATIVE}/${SDKPATHNATIVE}/usr/lib/${TARGET_SYS}/rustlib/${HOST_SYS}/lib \ | ||
18 | " | ||
19 | |||
20 | DEPENDS += "rust-native \ | ||
21 | rust-cross-canadian-${TRANSLATED_TARGET_ARCH} \ | ||
22 | virtual/nativesdk-${HOST_PREFIX}compilerlibs \ | ||
23 | nativesdk-openssl nativesdk-zlib \ | ||
24 | virtual/nativesdk-libc \ | ||
25 | " | ||
26 | |||
27 | inherit cross-canadian | ||
28 | |||
29 | PN = "cargo-cross-canadian-${TRANSLATED_TARGET_ARCH}" | ||
30 | |||
31 | LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}" | ||
32 | |||
33 | python do_rust_gen_targets () { | ||
34 | wd = d.getVar('WORKDIR') + '/targets/' | ||
35 | |||
36 | rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) | ||
37 | rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) | ||
38 | } | ||
39 | |||
40 | do_compile:prepend () { | ||
41 | PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${PKG_CONFIG_PATH}" | ||
42 | } | ||
43 | |||
44 | do_install () { | ||
45 | SYS_BINDIR=$(dirname ${D}${bindir}) | ||
46 | install -d "${SYS_BINDIR}" | ||
47 | install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${SYS_BINDIR}" | ||
48 | for i in ${SYS_BINDIR}/*; do | ||
49 | chrpath -r "\$ORIGIN/../lib" ${i} | ||
50 | done | ||
51 | |||
52 | ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d | ||
53 | mkdir "${ENV_SETUP_DIR}" | ||
54 | ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" | ||
55 | cat <<- EOF > "${ENV_SETUP_SH}" | ||
56 | export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" | ||
57 | mkdir -p "\$CARGO_HOME" | ||
58 | # Init the default target once, it might be otherwise user modified. | ||
59 | if [ ! -f "\$CARGO_HOME/config" ]; then | ||
60 | touch "\$CARGO_HOME/config" | ||
61 | echo "[build]" >> "\$CARGO_HOME/config" | ||
62 | echo 'target = "'${TARGET_SYS}'"' >> "\$CARGO_HOME/config" | ||
63 | fi | ||
64 | |||
65 | # Keep the below off as long as HTTP/2 is disabled. | ||
66 | export CARGO_HTTP_MULTIPLEXING=false | ||
67 | |||
68 | export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt" | ||
69 | EOF | ||
70 | } | ||
71 | |||
72 | PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin" | ||
73 | FILES:${PN} += "${base_prefix}/environment-setup.d ${PKG_SYS_BINDIR}" | ||
74 | |||
diff --git a/meta/recipes-devtools/cargo/cargo-cross-canadian_1.51.0.bb b/meta/recipes-devtools/cargo/cargo-cross-canadian_1.51.0.bb new file mode 100644 index 0000000000..dba400bcfb --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo-cross-canadian_1.51.0.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require recipes-devtools/rust/rust-source-${PV}.inc | ||
2 | require recipes-devtools/rust/rust-snapshot-${PV}.inc | ||
3 | |||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:" | ||
5 | |||
6 | require cargo-cross-canadian.inc | ||
diff --git a/meta/recipes-devtools/cargo/cargo-cross-canadian_1.54.0.bb b/meta/recipes-devtools/cargo/cargo-cross-canadian_1.54.0.bb new file mode 100644 index 0000000000..dba400bcfb --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo-cross-canadian_1.54.0.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require recipes-devtools/rust/rust-source-${PV}.inc | ||
2 | require recipes-devtools/rust/rust-snapshot-${PV}.inc | ||
3 | |||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:" | ||
5 | |||
6 | require cargo-cross-canadian.inc | ||
diff --git a/meta/recipes-devtools/cargo/cargo.inc b/meta/recipes-devtools/cargo/cargo.inc new file mode 100644 index 0000000000..32ccf0b7ae --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo.inc | |||
@@ -0,0 +1,50 @@ | |||
1 | SUMMARY ?= "Cargo, a package manager for Rust." | ||
2 | HOMEPAGE = "https://crates.io" | ||
3 | LICENSE = "MIT | Apache-2.0" | ||
4 | SECTION = "devel" | ||
5 | |||
6 | DEPENDS = "openssl zlib curl ca-certificates libssh2" | ||
7 | |||
8 | LIC_FILES_CHKSUM = " \ | ||
9 | file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \ | ||
10 | file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \ | ||
11 | file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \ | ||
12 | " | ||
13 | |||
14 | |||
15 | S = "${RUSTSRC}/src/tools/cargo" | ||
16 | CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" | ||
17 | |||
18 | inherit cargo | ||
19 | |||
20 | do_cargo_setup_snapshot () { | ||
21 | ${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig | ||
22 | } | ||
23 | |||
24 | addtask cargo_setup_snapshot after do_unpack before do_configure | ||
25 | do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}" | ||
26 | |||
27 | do_compile:prepend () { | ||
28 | export RUSTC_BOOTSTRAP="1" | ||
29 | } | ||
30 | |||
31 | do_install () { | ||
32 | install -d "${D}${bindir}" | ||
33 | install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${D}${bindir}" | ||
34 | } | ||
35 | |||
36 | # Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1) | ||
37 | # as shipped by Yocto Dunfell. | ||
38 | # According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between | ||
39 | # libgit2-sys and arbitrary system libgit2 versions, so better keep this turned off. | ||
40 | #export LIBGIT2_SYS_USE_PKG_CONFIG = "1" | ||
41 | |||
42 | # Needed for pkg-config to be used | ||
43 | export LIBSSH2_SYS_USE_PKG_CONFIG = "1" | ||
44 | |||
45 | BBCLASSEXTEND = "native nativesdk" | ||
46 | |||
47 | # When building cargo-native we don't have cargo-native to use and depend on, | ||
48 | # so we must use the locally set up snapshot to bootstrap the build. | ||
49 | BASEDEPENDS:remove:class-native = "cargo-native" | ||
50 | CARGO:class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo" | ||
diff --git a/meta/recipes-devtools/cargo/cargo_1.51.0.bb b/meta/recipes-devtools/cargo/cargo_1.51.0.bb new file mode 100644 index 0000000000..335b491cc9 --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo_1.51.0.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require recipes-devtools/rust/rust-source-${PV}.inc | ||
2 | require recipes-devtools/rust/rust-snapshot-${PV}.inc | ||
3 | require cargo.inc | ||
4 | |||
5 | SRC_URI += "file://0001-Disable-http2.patch \ | ||
6 | file://riscv-march.patch;patchdir=../../.. \ | ||
7 | file://rv64gc.patch;patchdir=../../.. \ | ||
8 | " | ||
diff --git a/meta/recipes-devtools/cargo/cargo_1.54.0.bb b/meta/recipes-devtools/cargo/cargo_1.54.0.bb new file mode 100644 index 0000000000..1f69615640 --- /dev/null +++ b/meta/recipes-devtools/cargo/cargo_1.54.0.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require recipes-devtools/rust/rust-source-${PV}.inc | ||
2 | require recipes-devtools/rust/rust-snapshot-${PV}.inc | ||
3 | require cargo.inc | ||
4 | |||