Compare commits
7 Commits
test-dunfe
...
fix-ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24c3e2016d | ||
|
|
c92db6c0a0 | ||
|
|
c654f5cb92 | ||
|
|
297dbb9d1a | ||
|
|
d0044639fe | ||
|
|
4bde33e1fc | ||
|
|
af6d045ac3 |
34
.github/workflows/main.yml
vendored
34
.github/workflows/main.yml
vendored
@@ -1,14 +1,9 @@
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
yoctobranch: [dunfell, hardknott]
|
||||
include:
|
||||
- yoctobranch: hardknott
|
||||
yoctoversion: 3.3.2
|
||||
- yoctobranch: dunfell
|
||||
yoctoversion: 3.1.9
|
||||
env:
|
||||
YOCTO_VERSION: 3.3.2
|
||||
YOCTO_BRANCH: hardknott
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -16,36 +11,23 @@ jobs:
|
||||
path: 'meta-rust'
|
||||
- name: Fetch poky
|
||||
run: |
|
||||
mv poky/build/sstate-cache . || true
|
||||
rm -rf poky meta-openembedded
|
||||
git clone -b ${{ matrix.yoctobranch }} --single-branch git://git.yoctoproject.org/poky
|
||||
git clone -b ${{ matrix.yoctobranch }} --single-branch git://git.openembedded.org/meta-openembedded
|
||||
git clone -b $YOCTO_BRANCH --single-branch git://git.yoctoproject.org/poky
|
||||
git clone -b $YOCTO_BRANCH --single-branch git://git.openembedded.org/meta-openembedded
|
||||
- name: Configure build
|
||||
run: |
|
||||
cd poky
|
||||
. oe-init-build-env
|
||||
mv ../../sstate-cache . || true
|
||||
bitbake-layers add-layer ../../meta-openembedded/meta-oe
|
||||
bitbake-layers add-layer ../../meta-rust
|
||||
echo 'PARALLEL_MAKE:pn-rust-llvm-native = "-j2"' >> conf/local.conf
|
||||
echo 'TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}"' >> conf/local.conf
|
||||
echo "SSTATE_MIRRORS = \"file://.* http://sstate.yoctoproject.org/${{ matrix.yoctoversion }}/PATH;downloadfilename=PATH \\n\"" >> conf/local.conf
|
||||
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"' >> conf/local.conf
|
||||
echo 'INHERIT_remove = "uninative"' >> conf/local.conf
|
||||
- name: Run bitbake
|
||||
run: |
|
||||
cd poky
|
||||
. oe-init-build-env
|
||||
bitbake rust-hello-world
|
||||
- name: Test SDK
|
||||
run: |
|
||||
SDK_DIR=$PWD/sdk-test
|
||||
cd poky
|
||||
. oe-init-build-env
|
||||
bitbake core-image-minimal -c populate_sdk
|
||||
rm -rf $SDK_DIR
|
||||
./$(find ./tmp/deploy/sdk/ -name '*.sh') -d $SDK_DIR -y
|
||||
. $(find $SDK_DIR -name 'environment-setup-*')
|
||||
PROG=hello
|
||||
rm -rf $PROG
|
||||
cargo new $PROG
|
||||
cd $PROG
|
||||
cargo build
|
||||
file $(find ./target -name $PROG)
|
||||
|
||||
@@ -59,7 +59,7 @@ The master branch supports the latest master of poky. When poky creates releases
|
||||
|
||||
All new patches against rust, rust-llvm, and cargo must have referenced
|
||||
upstream issues or PRs opened or an explanation why the patch cannot be
|
||||
upstreamed. This cooresponds to the OpenEmbedded policy for other meta layers.
|
||||
upstreamed. This corresponds to the OpenEmbedded policy for other meta layers.
|
||||
|
||||
More info can be seen on the wiki.
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From 9844e63845da6cdafa485ad1ad3c99eaaa80312d Mon Sep 17 00:00:00 2001
|
||||
From: Johan Anderholm <johan.anderholm@gmail.com>
|
||||
Date: Sun, 27 Jan 2019 10:19:00 +0100
|
||||
Subject: [PATCH] Disable http2
|
||||
|
||||
http2 requires that curl is build with nghttp2 which in turn depends on
|
||||
many dependencies and ultimately a dependency loop in the case of
|
||||
curl-native. As long as multiplexing is disabled in cargo this should
|
||||
be fine.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
---
|
||||
Cargo.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 8a144a4..c4f856e 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" }
|
||||
crates-io = { path = "crates/crates-io", version = "0.33.0" }
|
||||
crossbeam-utils = "0.8"
|
||||
crypto-hash = "0.3.1"
|
||||
-curl = { version = "0.4.23", features = ["http2"] }
|
||||
+curl = { version = "0.4.23" }
|
||||
curl-sys = "0.4.22"
|
||||
env_logger = "0.8.1"
|
||||
pretty_env_logger = { version = "0.4", optional = true }
|
||||
@@ -1,73 +0,0 @@
|
||||
Add suppor for riscv64 and riscv32 musl targets
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
--- a/vendor/cc/src/lib.rs
|
||||
+++ b/vendor/cc/src/lib.rs
|
||||
@@ -2361,6 +2361,7 @@ impl Build {
|
||||
"riscv-none-embed",
|
||||
]),
|
||||
"riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
|
||||
+ "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
|
||||
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
|
||||
"sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
|
||||
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
|
||||
--- a/compiler/rustc_target/src/spec/mod.rs
|
||||
+++ b/compiler/rustc_target/src/spec/mod.rs
|
||||
@@ -641,9 +641,11 @@ supported_targets! {
|
||||
("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
|
||||
("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf),
|
||||
("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu),
|
||||
+ ("riscv32gc-unknown-linux-musl", riscv32gc_unknown_linux_musl),
|
||||
("riscv64imac-unknown-none-elf", riscv64imac_unknown_none_elf),
|
||||
("riscv64gc-unknown-none-elf", riscv64gc_unknown_none_elf),
|
||||
("riscv64gc-unknown-linux-gnu", riscv64gc_unknown_linux_gnu),
|
||||
+ ("riscv64gc-unknown-linux-musl", riscv64gc_unknown_linux_musl),
|
||||
|
||||
("aarch64-unknown-none", aarch64_unknown_none),
|
||||
("aarch64-unknown-none-softfloat", aarch64_unknown_none_softfloat),
|
||||
--- /dev/null
|
||||
+++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs
|
||||
@@ -0,0 +1,19 @@
|
||||
+use crate::spec::{CodeModel, Target, TargetOptions};
|
||||
+
|
||||
+pub fn target() -> Target {
|
||||
+ Target {
|
||||
+ llvm_target: "riscv32-unknown-linux-musl".to_string(),
|
||||
+ pointer_width: 32,
|
||||
+ data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
|
||||
+ arch: "riscv32".to_string(),
|
||||
+ options: TargetOptions {
|
||||
+ unsupported_abis: super::riscv_base::unsupported_abis(),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
+ cpu: "generic-rv32".to_string(),
|
||||
+ features: "+m,+a,+f,+d,+c".to_string(),
|
||||
+ llvm_abiname: "ilp32d".to_string(),
|
||||
+ max_atomic_width: Some(32),
|
||||
+ ..super::linux_musl_base::opts()
|
||||
+ },
|
||||
+ }
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs
|
||||
@@ -0,0 +1,19 @@
|
||||
+use crate::spec::{CodeModel, Target, TargetOptions};
|
||||
+
|
||||
+pub fn target() -> Target {
|
||||
+ Target {
|
||||
+ llvm_target: "riscv64-unknown-linux-musl".to_string(),
|
||||
+ pointer_width: 64,
|
||||
+ data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(),
|
||||
+ arch: "riscv64".to_string(),
|
||||
+ options: TargetOptions {
|
||||
+ unsupported_abis: super::riscv_base::unsupported_abis(),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
+ cpu: "generic-rv64".to_string(),
|
||||
+ features: "+m,+a,+f,+d,+c".to_string(),
|
||||
+ llvm_abiname: "lp64d".to_string(),
|
||||
+ max_atomic_width: Some(64),
|
||||
+ ..super::linux_musl_base::opts()
|
||||
+ },
|
||||
+ }
|
||||
+}
|
||||
@@ -1,37 +0,0 @@
|
||||
--- a/vendor/cc-1.0.60/.cargo-checksum.json
|
||||
+++ b/vendor/cc-1.0.60/.cargo-checksum.json
|
||||
@@ -1 +1 @@
|
||||
-{"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"}
|
||||
\ No newline at end of file
|
||||
+{"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"}
|
||||
--- a/vendor/cc-1.0.60/src/lib.rs
|
||||
+++ b/vendor/cc-1.0.60/src/lib.rs
|
||||
@@ -1639,14 +1639,17 @@ impl Build {
|
||||
let mut parts = target.split('-');
|
||||
if let Some(arch) = parts.next() {
|
||||
let arch = &arch[5..];
|
||||
- cmd.args.push(("-march=rv".to_owned() + arch).into());
|
||||
if target.contains("linux") && arch.starts_with("64") {
|
||||
+ cmd.args.push(("-march=rv64gc").into());
|
||||
cmd.args.push("-mabi=lp64d".into());
|
||||
} else if target.contains("linux") && arch.starts_with("32") {
|
||||
+ cmd.args.push(("-march=rv32gc").into());
|
||||
cmd.args.push("-mabi=ilp32d".into());
|
||||
} else if arch.starts_with("64") {
|
||||
+ cmd.args.push(("-march=rv".to_owned() + arch).into());
|
||||
cmd.args.push("-mabi=lp64".into());
|
||||
} else {
|
||||
+ cmd.args.push(("-march=rv".to_owned() + arch).into());
|
||||
cmd.args.push("-mabi=ilp32".into());
|
||||
}
|
||||
cmd.args.push("-mcmodel=medany".into());
|
||||
@@ -2332,6 +2335,9 @@ impl Build {
|
||||
"riscv-none-embed",
|
||||
]),
|
||||
"riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
|
||||
+ "riscv32gc-unknown-linux-gnu" => Some("riscv32-linux-gnu"),
|
||||
+ "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
|
||||
+ "riscv32gc-unknown-linux-musl" => Some("riscv32-linux-musl"),
|
||||
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
|
||||
"sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
|
||||
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
|
||||
@@ -1,6 +0,0 @@
|
||||
require recipes-devtools/rust/rust-source-${PV}.inc
|
||||
require recipes-devtools/rust/rust-snapshot-${PV}.inc
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:"
|
||||
|
||||
require cargo-cross-canadian.inc
|
||||
6
recipes-devtools/cargo/cargo-cross-canadian_1.58.1.bb
Normal file
6
recipes-devtools/cargo/cargo-cross-canadian_1.58.1.bb
Normal file
@@ -0,0 +1,6 @@
|
||||
require recipes-devtools/rust/rust-source.inc
|
||||
require recipes-devtools/rust/rust-snapshot.inc
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:"
|
||||
|
||||
require cargo-cross-canadian.inc
|
||||
@@ -14,15 +14,23 @@ LIC_FILES_CHKSUM = " \
|
||||
|
||||
S = "${RUSTSRC}/src/tools/cargo"
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
|
||||
inherit cargo
|
||||
inherit cargo pkgconfig
|
||||
|
||||
do_cargo_setup_snapshot () {
|
||||
${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig
|
||||
# Need to use uninative's loader if enabled/present since the library paths
|
||||
# are used internally by rust and result in symbol mismatches if we don't
|
||||
if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
|
||||
patchelf-uninative ${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo --set-interpreter ${UNINATIVE_LOADER}
|
||||
fi
|
||||
}
|
||||
|
||||
addtask cargo_setup_snapshot after do_unpack before do_configure
|
||||
do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}"
|
||||
do_cargo_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
|
||||
|
||||
|
||||
do_compile:prepend () {
|
||||
export RUSTC_BOOTSTRAP="1"
|
||||
@@ -42,8 +50,6 @@ do_install () {
|
||||
# Needed for pkg-config to be used
|
||||
export LIBSSH2_SYS_USE_PKG_CONFIG = "1"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
# When building cargo-native we don't have cargo-native to use and depend on,
|
||||
# so we must use the locally set up snapshot to bootstrap the build.
|
||||
BASEDEPENDS:remove:class-native = "cargo-native"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
require recipes-devtools/rust/rust-source-${PV}.inc
|
||||
require recipes-devtools/rust/rust-snapshot-${PV}.inc
|
||||
require cargo.inc
|
||||
|
||||
SRC_URI += "file://0001-Disable-http2.patch \
|
||||
file://riscv-march.patch;patchdir=../../.. \
|
||||
file://rv64gc.patch;patchdir=../../.. \
|
||||
"
|
||||
@@ -1,4 +1,4 @@
|
||||
require recipes-devtools/rust/rust-source-${PV}.inc
|
||||
require recipes-devtools/rust/rust-snapshot-${PV}.inc
|
||||
require cargo.inc
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
4
recipes-devtools/cargo/cargo_1.58.1.bb
Normal file
4
recipes-devtools/cargo/cargo_1.58.1.bb
Normal file
@@ -0,0 +1,4 @@
|
||||
require recipes-devtools/rust/rust-source.inc
|
||||
require recipes-devtools/rust/rust-snapshot.inc
|
||||
require cargo.inc
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -1,73 +0,0 @@
|
||||
Add suppor for riscv64 and riscv32 musl targets
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
--- a/vendor/cc/src/lib.rs
|
||||
+++ b/vendor/cc/src/lib.rs
|
||||
@@ -2361,6 +2361,7 @@ impl Build {
|
||||
"riscv-none-embed",
|
||||
]),
|
||||
"riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
|
||||
+ "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
|
||||
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
|
||||
"sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
|
||||
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
|
||||
--- a/compiler/rustc_target/src/spec/mod.rs
|
||||
+++ b/compiler/rustc_target/src/spec/mod.rs
|
||||
@@ -641,9 +641,11 @@ supported_targets! {
|
||||
("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
|
||||
("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf),
|
||||
("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu),
|
||||
+ ("riscv32gc-unknown-linux-musl", riscv32gc_unknown_linux_musl),
|
||||
("riscv64imac-unknown-none-elf", riscv64imac_unknown_none_elf),
|
||||
("riscv64gc-unknown-none-elf", riscv64gc_unknown_none_elf),
|
||||
("riscv64gc-unknown-linux-gnu", riscv64gc_unknown_linux_gnu),
|
||||
+ ("riscv64gc-unknown-linux-musl", riscv64gc_unknown_linux_musl),
|
||||
|
||||
("aarch64-unknown-none", aarch64_unknown_none),
|
||||
("aarch64-unknown-none-softfloat", aarch64_unknown_none_softfloat),
|
||||
--- /dev/null
|
||||
+++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs
|
||||
@@ -0,0 +1,19 @@
|
||||
+use crate::spec::{CodeModel, Target, TargetOptions};
|
||||
+
|
||||
+pub fn target() -> Target {
|
||||
+ Target {
|
||||
+ llvm_target: "riscv32-unknown-linux-musl".to_string(),
|
||||
+ pointer_width: 32,
|
||||
+ data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
|
||||
+ arch: "riscv32".to_string(),
|
||||
+ options: TargetOptions {
|
||||
+ unsupported_abis: super::riscv_base::unsupported_abis(),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
+ cpu: "generic-rv32".to_string(),
|
||||
+ features: "+m,+a,+f,+d,+c".to_string(),
|
||||
+ llvm_abiname: "ilp32d".to_string(),
|
||||
+ max_atomic_width: Some(32),
|
||||
+ ..super::linux_musl_base::opts()
|
||||
+ },
|
||||
+ }
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs
|
||||
@@ -0,0 +1,19 @@
|
||||
+use crate::spec::{CodeModel, Target, TargetOptions};
|
||||
+
|
||||
+pub fn target() -> Target {
|
||||
+ Target {
|
||||
+ llvm_target: "riscv64-unknown-linux-musl".to_string(),
|
||||
+ pointer_width: 64,
|
||||
+ data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(),
|
||||
+ arch: "riscv64".to_string(),
|
||||
+ options: TargetOptions {
|
||||
+ unsupported_abis: super::riscv_base::unsupported_abis(),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
+ cpu: "generic-rv64".to_string(),
|
||||
+ features: "+m,+a,+f,+d,+c".to_string(),
|
||||
+ llvm_abiname: "lp64d".to_string(),
|
||||
+ max_atomic_width: Some(64),
|
||||
+ ..super::linux_musl_base::opts()
|
||||
+ },
|
||||
+ }
|
||||
+}
|
||||
@@ -1,37 +0,0 @@
|
||||
--- a/vendor/cc-1.0.60/.cargo-checksum.json
|
||||
+++ b/vendor/cc-1.0.60/.cargo-checksum.json
|
||||
@@ -1 +1 @@
|
||||
-{"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"}
|
||||
\ No newline at end of file
|
||||
+{"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"}
|
||||
--- a/vendor/cc-1.0.60/src/lib.rs
|
||||
+++ b/vendor/cc-1.0.60/src/lib.rs
|
||||
@@ -1639,14 +1639,17 @@ impl Build {
|
||||
let mut parts = target.split('-');
|
||||
if let Some(arch) = parts.next() {
|
||||
let arch = &arch[5..];
|
||||
- cmd.args.push(("-march=rv".to_owned() + arch).into());
|
||||
if target.contains("linux") && arch.starts_with("64") {
|
||||
+ cmd.args.push(("-march=rv64gc").into());
|
||||
cmd.args.push("-mabi=lp64d".into());
|
||||
} else if target.contains("linux") && arch.starts_with("32") {
|
||||
+ cmd.args.push(("-march=rv32gc").into());
|
||||
cmd.args.push("-mabi=ilp32d".into());
|
||||
} else if arch.starts_with("64") {
|
||||
+ cmd.args.push(("-march=rv".to_owned() + arch).into());
|
||||
cmd.args.push("-mabi=lp64".into());
|
||||
} else {
|
||||
+ cmd.args.push(("-march=rv".to_owned() + arch).into());
|
||||
cmd.args.push("-mabi=ilp32".into());
|
||||
}
|
||||
cmd.args.push("-mcmodel=medany".into());
|
||||
@@ -2332,6 +2335,9 @@ impl Build {
|
||||
"riscv-none-embed",
|
||||
]),
|
||||
"riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
|
||||
+ "riscv32gc-unknown-linux-gnu" => Some("riscv32-linux-gnu"),
|
||||
+ "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
|
||||
+ "riscv32gc-unknown-linux-musl" => Some("riscv32-linux-musl"),
|
||||
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
|
||||
"sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
|
||||
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
|
||||
File diff suppressed because one or more lines are too long
@@ -1,22 +1,24 @@
|
||||
From 23aa6dfba4f2745800d89f9ee67d390465c76bfa Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 00:32:57 -0800
|
||||
From 8b86ecf87cf3589861b458f099572ad8487fc6cc Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Anton Beier <ralf_beier@me.com>
|
||||
Date: Sun, 8 Aug 2021 11:05:06 +0200
|
||||
Subject: [PATCH 1/4] Add base definitions for riscv64 + musl
|
||||
|
||||
https://github.com/rust-lang/libc/pull/1994/commits/030a07761f61f3293d53752e60edbd330a9d718d
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2537]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
|
||||
---
|
||||
.../src/unix/linux_like/linux/musl/b64/mod.rs | 3 +
|
||||
.../linux_like/linux/musl/b64/riscv64/mod.rs | 867 ++++++++++++++++++
|
||||
2 files changed, 870 insertions(+)
|
||||
.../linux_like/linux/musl/b64/riscv64/mod.rs | 832 ++++++++++++++++++
|
||||
2 files changed, 835 insertions(+)
|
||||
create mode 100644 vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
|
||||
|
||||
diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
|
||||
index 62abee00d..78e805b15 100644
|
||||
index cfcdaaecf..7261b95d2 100644
|
||||
--- a/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
|
||||
+++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
|
||||
@@ -164,6 +164,9 @@ cfg_if! {
|
||||
@@ -163,6 +163,9 @@ cfg_if! {
|
||||
} else if #[cfg(any(target_arch = "x86_64"))] {
|
||||
mod x86_64;
|
||||
pub use self::x86_64::*;
|
||||
@@ -28,10 +30,10 @@ index 62abee00d..78e805b15 100644
|
||||
}
|
||||
diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
|
||||
new file mode 100644
|
||||
index 000000000..14bae11d0
|
||||
index 000000000..c656189c4
|
||||
--- /dev/null
|
||||
+++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
|
||||
@@ -0,0 +1,867 @@
|
||||
@@ -0,0 +1,832 @@
|
||||
+//! RISC-V-specific definitions for 64-bit linux-like values
|
||||
+
|
||||
+pub type c_char = u8;
|
||||
@@ -339,59 +341,7 @@ index 000000000..14bae11d0
|
||||
+pub const ENOTRECOVERABLE: ::c_int = 131;
|
||||
+pub const EHWPOISON: ::c_int = 133;
|
||||
+pub const ERFKILL: ::c_int = 132;
|
||||
+pub const SOL_SOCKET: ::c_int = 1;
|
||||
+pub const SO_REUSEADDR: ::c_int = 2;
|
||||
+pub const SO_TYPE: ::c_int = 3;
|
||||
+pub const SO_ERROR: ::c_int = 4;
|
||||
+pub const SO_DONTROUTE: ::c_int = 5;
|
||||
+pub const SO_BROADCAST: ::c_int = 6;
|
||||
+pub const SO_SNDBUF: ::c_int = 7;
|
||||
+pub const SO_RCVBUF: ::c_int = 8;
|
||||
+pub const SO_SNDBUFFORCE: ::c_int = 32;
|
||||
+pub const SO_RCVBUFFORCE: ::c_int = 33;
|
||||
+pub const SO_KEEPALIVE: ::c_int = 9;
|
||||
+pub const SO_OOBINLINE: ::c_int = 10;
|
||||
+pub const SO_NO_CHECK: ::c_int = 11;
|
||||
+pub const SO_PRIORITY: ::c_int = 12;
|
||||
+pub const SO_LINGER: ::c_int = 13;
|
||||
+pub const SO_BSDCOMPAT: ::c_int = 14;
|
||||
+pub const SO_REUSEPORT: ::c_int = 15;
|
||||
+pub const SO_PASSCRED: ::c_int = 16;
|
||||
+pub const SO_PEERCRED: ::c_int = 17;
|
||||
+pub const SO_RCVLOWAT: ::c_int = 18;
|
||||
+pub const SO_SNDLOWAT: ::c_int = 19;
|
||||
+pub const SO_RCVTIMEO: ::c_int = 20;
|
||||
+pub const SO_SNDTIMEO: ::c_int = 21;
|
||||
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
|
||||
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
|
||||
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
|
||||
+pub const SO_BINDTODEVICE: ::c_int = 25;
|
||||
+pub const SO_ATTACH_FILTER: ::c_int = 26;
|
||||
+pub const SO_DETACH_FILTER: ::c_int = 27;
|
||||
+pub const SO_GET_FILTER: ::c_int = 26;
|
||||
+pub const SO_PEERNAME: ::c_int = 28;
|
||||
+pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
+pub const SO_ACCEPTCONN: ::c_int = 30;
|
||||
+pub const SO_PEERSEC: ::c_int = 31;
|
||||
+pub const SO_PASSSEC: ::c_int = 34;
|
||||
+pub const SO_TIMESTAMPNS: ::c_int = 35;
|
||||
+pub const SCM_TIMESTAMPNS: ::c_int = 35;
|
||||
+pub const SO_MARK: ::c_int = 36;
|
||||
+pub const SO_PROTOCOL: ::c_int = 38;
|
||||
+pub const SO_DOMAIN: ::c_int = 39;
|
||||
+pub const SO_RXQ_OVFL: ::c_int = 40;
|
||||
+pub const SO_WIFI_STATUS: ::c_int = 41;
|
||||
+pub const SCM_WIFI_STATUS: ::c_int = 41;
|
||||
+pub const SO_PEEK_OFF: ::c_int = 42;
|
||||
+pub const SO_NOFCS: ::c_int = 43;
|
||||
+pub const SO_LOCK_FILTER: ::c_int = 44;
|
||||
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
|
||||
+pub const SO_BUSY_POLL: ::c_int = 46;
|
||||
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
|
||||
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
|
||||
+pub const SO_INCOMING_CPU: ::c_int = 49;
|
||||
+pub const SO_ATTACH_BPF: ::c_int = 50;
|
||||
+pub const SO_DETACH_BPF: ::c_int = 27;
|
||||
+
|
||||
+pub const SOCK_STREAM: ::c_int = 1;
|
||||
+pub const SOCK_DGRAM: ::c_int = 2;
|
||||
+pub const SA_ONSTACK: ::c_int = 134217728;
|
||||
@@ -497,7 +447,7 @@ index 000000000..14bae11d0
|
||||
+pub const MAP_POPULATE: ::c_int = 32768;
|
||||
+pub const MAP_NONBLOCK: ::c_int = 65536;
|
||||
+pub const MAP_STACK: ::c_int = 131072;
|
||||
+pub const MAP_SYNC : ::c_int = 0x080000;
|
||||
+pub const MAP_SYNC: ::c_int = 0x080000;
|
||||
+pub const EDEADLOCK: ::c_int = 35;
|
||||
+pub const EUCLEAN: ::c_int = 117;
|
||||
+pub const ENOTNAM: ::c_int = 118;
|
||||
@@ -897,8 +847,25 @@ index 000000000..14bae11d0
|
||||
+pub const SYS_pkey_alloc: ::c_long = 289;
|
||||
+pub const SYS_pkey_free: ::c_long = 290;
|
||||
+pub const SYS_statx: ::c_long = 291;
|
||||
+pub const SYS_pidfd_send_signal: ::c_long = 424;
|
||||
+pub const SYS_io_uring_setup: ::c_long = 425;
|
||||
+pub const SYS_io_uring_enter: ::c_long = 426;
|
||||
+pub const SYS_io_uring_register: ::c_long = 427;
|
||||
+pub const SYS_open_tree: ::c_long = 428;
|
||||
+pub const SYS_move_mount: ::c_long = 429;
|
||||
+pub const SYS_fsopen: ::c_long = 430;
|
||||
+pub const SYS_fsconfig: ::c_long = 431;
|
||||
+pub const SYS_fsmount: ::c_long = 432;
|
||||
+pub const SYS_fspick: ::c_long = 433;
|
||||
+pub const SYS_pidfd_open: ::c_long = 434;
|
||||
+pub const SYS_clone3: ::c_long = 435;
|
||||
+pub const SYS_close_range: ::c_long = 436;
|
||||
+pub const SYS_openat2: ::c_long = 437;
|
||||
+pub const SYS_pidfd_getfd: ::c_long = 438;
|
||||
+pub const SYS_faccessat2: ::c_long = 439;
|
||||
+pub const SYS_process_madvise: ::c_long = 440;
|
||||
+pub const SYS_epoll_pwait2: ::c_long = 441;
|
||||
+pub const SYS_mount_setattr: ::c_long = 442;
|
||||
--
|
||||
2.30.1
|
||||
2.20.1
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
From 2f418ff6fbe1dbdd2f56b3e208f3da6d71c0a7e4 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 00:34:05 -0800
|
||||
From bd805ef63035ecefa03f67d5ab2e1d79f7daf9bc Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Anton Beier <ralf_beier@me.com>
|
||||
Date: Sun, 8 Aug 2021 11:07:21 +0200
|
||||
Subject: [PATCH 2/4] FIXUP: linux/musl/mod.rs: add riscv64 to b64 set
|
||||
|
||||
https://github.com/rust-lang/libc/pull/1994/commits/30070c822be2ef399b2ba38cdc1d72ac694d65a3
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2537]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
|
||||
---
|
||||
vendor/libc/src/unix/linux_like/linux/musl/mod.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
|
||||
index 0d427ae38..d7eb212f7 100644
|
||||
index df596e968..1ab13a712 100644
|
||||
--- a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
|
||||
+++ b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
|
||||
@@ -601,7 +601,8 @@ cfg_if! {
|
||||
if #[cfg(any(target_arch = "x86_64",
|
||||
@@ -765,7 +765,8 @@ cfg_if! {
|
||||
target_arch = "aarch64",
|
||||
target_arch = "mips64",
|
||||
- target_arch = "powerpc64"))] {
|
||||
+ target_arch = "powerpc64",
|
||||
target_arch = "powerpc64",
|
||||
- target_arch = "s390x"))] {
|
||||
+ target_arch = "s390x",
|
||||
+ target_arch = "riscv64"))] {
|
||||
mod b64;
|
||||
pub use self::b64::*;
|
||||
} else if #[cfg(any(target_arch = "x86",
|
||||
--
|
||||
2.30.1
|
||||
2.20.1
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
From f6a2f444d9deae167f4c939c6e874744986744a1 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 00:34:56 -0800
|
||||
From a811c933372b18b98fdef3d5901b512131b27b1c Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Anton Beier <ralf_beier@me.com>
|
||||
Date: Sun, 8 Aug 2021 11:09:17 +0200
|
||||
Subject: [PATCH 3/4] FIXUP Correct definitions to match musl
|
||||
|
||||
https://github.com/rust-lang/libc/pull/1994/commits/5f6a4d9745c79c81be63c708515ab116786554a3
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2537]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
|
||||
---
|
||||
.../linux_like/linux/musl/b64/riscv64/mod.rs | 708 ++++++++----------
|
||||
1 file changed, 311 insertions(+), 397 deletions(-)
|
||||
.../linux_like/linux/musl/b64/riscv64/mod.rs | 655 +++++++++---------
|
||||
1 file changed, 312 insertions(+), 343 deletions(-)
|
||||
|
||||
diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
|
||||
index 14bae11d0..c37190cca 100644
|
||||
index c656189c4..1799539c2 100644
|
||||
--- a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
|
||||
+++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
|
||||
@@ -191,403 +191,8 @@ s! {
|
||||
@@ -191,351 +191,8 @@ s! {
|
||||
pub l_len: ::off64_t,
|
||||
pub l_pid: ::pid_t,
|
||||
}
|
||||
@@ -132,59 +134,7 @@ index 14bae11d0..c37190cca 100644
|
||||
-pub const ENOTRECOVERABLE: ::c_int = 131;
|
||||
-pub const EHWPOISON: ::c_int = 133;
|
||||
-pub const ERFKILL: ::c_int = 132;
|
||||
-pub const SOL_SOCKET: ::c_int = 1;
|
||||
-pub const SO_REUSEADDR: ::c_int = 2;
|
||||
-pub const SO_TYPE: ::c_int = 3;
|
||||
-pub const SO_ERROR: ::c_int = 4;
|
||||
-pub const SO_DONTROUTE: ::c_int = 5;
|
||||
-pub const SO_BROADCAST: ::c_int = 6;
|
||||
-pub const SO_SNDBUF: ::c_int = 7;
|
||||
-pub const SO_RCVBUF: ::c_int = 8;
|
||||
-pub const SO_SNDBUFFORCE: ::c_int = 32;
|
||||
-pub const SO_RCVBUFFORCE: ::c_int = 33;
|
||||
-pub const SO_KEEPALIVE: ::c_int = 9;
|
||||
-pub const SO_OOBINLINE: ::c_int = 10;
|
||||
-pub const SO_NO_CHECK: ::c_int = 11;
|
||||
-pub const SO_PRIORITY: ::c_int = 12;
|
||||
-pub const SO_LINGER: ::c_int = 13;
|
||||
-pub const SO_BSDCOMPAT: ::c_int = 14;
|
||||
-pub const SO_REUSEPORT: ::c_int = 15;
|
||||
-pub const SO_PASSCRED: ::c_int = 16;
|
||||
-pub const SO_PEERCRED: ::c_int = 17;
|
||||
-pub const SO_RCVLOWAT: ::c_int = 18;
|
||||
-pub const SO_SNDLOWAT: ::c_int = 19;
|
||||
-pub const SO_RCVTIMEO: ::c_int = 20;
|
||||
-pub const SO_SNDTIMEO: ::c_int = 21;
|
||||
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
|
||||
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
|
||||
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
|
||||
-pub const SO_BINDTODEVICE: ::c_int = 25;
|
||||
-pub const SO_ATTACH_FILTER: ::c_int = 26;
|
||||
-pub const SO_DETACH_FILTER: ::c_int = 27;
|
||||
-pub const SO_GET_FILTER: ::c_int = 26;
|
||||
-pub const SO_PEERNAME: ::c_int = 28;
|
||||
-pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
-pub const SO_ACCEPTCONN: ::c_int = 30;
|
||||
-pub const SO_PEERSEC: ::c_int = 31;
|
||||
-pub const SO_PASSSEC: ::c_int = 34;
|
||||
-pub const SO_TIMESTAMPNS: ::c_int = 35;
|
||||
-pub const SCM_TIMESTAMPNS: ::c_int = 35;
|
||||
-pub const SO_MARK: ::c_int = 36;
|
||||
-pub const SO_PROTOCOL: ::c_int = 38;
|
||||
-pub const SO_DOMAIN: ::c_int = 39;
|
||||
-pub const SO_RXQ_OVFL: ::c_int = 40;
|
||||
-pub const SO_WIFI_STATUS: ::c_int = 41;
|
||||
-pub const SCM_WIFI_STATUS: ::c_int = 41;
|
||||
-pub const SO_PEEK_OFF: ::c_int = 42;
|
||||
-pub const SO_NOFCS: ::c_int = 43;
|
||||
-pub const SO_LOCK_FILTER: ::c_int = 44;
|
||||
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
|
||||
-pub const SO_BUSY_POLL: ::c_int = 46;
|
||||
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
|
||||
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
|
||||
-pub const SO_INCOMING_CPU: ::c_int = 49;
|
||||
-pub const SO_ATTACH_BPF: ::c_int = 50;
|
||||
-pub const SO_DETACH_BPF: ::c_int = 27;
|
||||
-
|
||||
-pub const SOCK_STREAM: ::c_int = 1;
|
||||
-pub const SOCK_DGRAM: ::c_int = 2;
|
||||
-pub const SA_ONSTACK: ::c_int = 134217728;
|
||||
@@ -290,7 +240,7 @@ index 14bae11d0..c37190cca 100644
|
||||
-pub const MAP_POPULATE: ::c_int = 32768;
|
||||
-pub const MAP_NONBLOCK: ::c_int = 65536;
|
||||
-pub const MAP_STACK: ::c_int = 131072;
|
||||
-pub const MAP_SYNC : ::c_int = 0x080000;
|
||||
-pub const MAP_SYNC: ::c_int = 0x080000;
|
||||
-pub const EDEADLOCK: ::c_int = 35;
|
||||
-pub const EUCLEAN: ::c_int = 117;
|
||||
-pub const ENOTNAM: ::c_int = 118;
|
||||
@@ -418,12 +368,11 @@ index 14bae11d0..c37190cca 100644
|
||||
pub const SYS_read: ::c_long = 63;
|
||||
pub const SYS_write: ::c_long = 64;
|
||||
pub const SYS_close: ::c_long = 57;
|
||||
@@ -863,5 +468,314 @@ pub const SYS_pkey_mprotect: ::c_long = 288;
|
||||
pub const SYS_pkey_alloc: ::c_long = 289;
|
||||
pub const SYS_pkey_free: ::c_long = 290;
|
||||
pub const SYS_statx: ::c_long = 291;
|
||||
-pub const SYS_pidfd_open: ::c_long = 434;
|
||||
-pub const SYS_clone3: ::c_long = 435;
|
||||
@@ -830,3 +487,315 @@ pub const SYS_faccessat2: ::c_long = 439;
|
||||
pub const SYS_process_madvise: ::c_long = 440;
|
||||
pub const SYS_epoll_pwait2: ::c_long = 441;
|
||||
pub const SYS_mount_setattr: ::c_long = 442;
|
||||
+
|
||||
+
|
||||
+pub const O_APPEND: ::c_int = 1024;
|
||||
+pub const O_DIRECT: ::c_int = 0x4000;
|
||||
@@ -736,5 +685,5 @@ index 14bae11d0..c37190cca 100644
|
||||
+ pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
|
||||
+}
|
||||
--
|
||||
2.30.1
|
||||
2.20.1
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,12 +1,12 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-source.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
SRC_URI += "file://riscv-march.patch;patchdir=../../ \
|
||||
file://rv64gc.patch;patchdir=../../ \
|
||||
SRC_URI += " \
|
||||
file://0001-Add-base-definitions-for-riscv64-musl.patch;patchdir=../../ \
|
||||
file://0002-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch;patchdir=../../ \
|
||||
file://0003-FIXUP-Correct-definitions-to-match-musl.patch;patchdir=../../ \
|
||||
file://0004-Update-1.51.0-checksums-for-modified-files.patch;patchdir=../../ \
|
||||
"
|
||||
file://0004-Update-checksums-for-modified-files-for-rust.patch;patchdir=../../ \
|
||||
"
|
||||
|
||||
# libstd moved from src/libstd to library/std in 1.47+
|
||||
S = "${RUSTSRC}/library/std"
|
||||
@@ -70,6 +70,7 @@ def llvm_features_from_tune(d):
|
||||
if ('riscv64' in feat) or ('riscv32' in feat):
|
||||
f.append("+a,+c,+d,+f,+m")
|
||||
return f
|
||||
llvm_features_from_tune[vardepvalue] = "${@llvm_features_from_tune(d)}"
|
||||
|
||||
# TARGET_CC_ARCH changes from build/cross/target so it'll do the right thing
|
||||
# this should go away when https://github.com/rust-lang/rust/pull/31709 is
|
||||
@@ -118,22 +119,22 @@ def llvm_features(d):
|
||||
|
||||
|
||||
## arm-unknown-linux-gnueabihf
|
||||
DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
LLVM_TARGET[arm] = "${RUST_TARGET_SYS}"
|
||||
TARGET_ENDIAN[arm] = "little"
|
||||
TARGET_POINTER_WIDTH[arm] = "32"
|
||||
TARGET_C_INT_WIDTH[arm] = "32"
|
||||
MAX_ATOMIC_WIDTH[arm] = "64"
|
||||
FEATURES[arm] = "+v6,+vfp2"
|
||||
DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}"
|
||||
TARGET_ENDIAN[arm-eabi] = "little"
|
||||
TARGET_POINTER_WIDTH[arm-eabi] = "32"
|
||||
TARGET_C_INT_WIDTH[arm-eabi] = "32"
|
||||
MAX_ATOMIC_WIDTH[arm-eabi] = "64"
|
||||
FEATURES[arm-eabi] = "+v6,+vfp2"
|
||||
|
||||
## armv7-unknown-linux-gnueabihf
|
||||
DATA_LAYOUT[armv7] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
LLVM_TARGET[armv7] = "${RUST_TARGET_SYS}"
|
||||
TARGET_ENDIAN[armv7] = "little"
|
||||
TARGET_POINTER_WIDTH[armv7] = "32"
|
||||
TARGET_C_INT_WIDTH[armv7] = "32"
|
||||
MAX_ATOMIC_WIDTH[armv7] = "64"
|
||||
FEATURES[armv7] = "+v7,+vfp2,+thumb2"
|
||||
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
LLVM_TARGET[armv7-eabi] = "${RUST_TARGET_SYS}"
|
||||
TARGET_ENDIAN[armv7-eabi] = "little"
|
||||
TARGET_POINTER_WIDTH[armv7-eabi] = "32"
|
||||
TARGET_C_INT_WIDTH[armv7-eabi] = "32"
|
||||
MAX_ATOMIC_WIDTH[armv7-eabi] = "64"
|
||||
FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2"
|
||||
|
||||
## aarch64-unknown-linux-{gnu, musl}
|
||||
DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
|
||||
@@ -151,6 +152,14 @@ TARGET_POINTER_WIDTH[x86_64] = "64"
|
||||
TARGET_C_INT_WIDTH[x86_64] = "32"
|
||||
MAX_ATOMIC_WIDTH[x86_64] = "64"
|
||||
|
||||
## x86_64-unknown-linux-gnux32
|
||||
DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
LLVM_TARGET[x86_64-x32] = "${RUST_TARGET_SYS}"
|
||||
TARGET_ENDIAN[x86_64-x32] = "little"
|
||||
TARGET_POINTER_WIDTH[x86_64-x32] = "32"
|
||||
TARGET_C_INT_WIDTH[x86_64-x32] = "32"
|
||||
MAX_ATOMIC_WIDTH[x86_64-x32] = "64"
|
||||
|
||||
## i686-unknown-linux-{gnu, musl}
|
||||
DATA_LAYOUT[i686] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
|
||||
LLVM_TARGET[i686] = "${RUST_TARGET_SYS}"
|
||||
@@ -207,6 +216,14 @@ TARGET_POINTER_WIDTH[powerpc] = "32"
|
||||
TARGET_C_INT_WIDTH[powerpc] = "32"
|
||||
MAX_ATOMIC_WIDTH[powerpc] = "32"
|
||||
|
||||
## powerpc64-unknown-linux-{gnu, musl}
|
||||
DATA_LAYOUT[powerpc64] = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
||||
LLVM_TARGET[powerpc64] = "${RUST_TARGET_SYS}"
|
||||
TARGET_ENDIAN[powerpc64] = "big"
|
||||
TARGET_POINTER_WIDTH[powerpc64] = "64"
|
||||
TARGET_C_INT_WIDTH[powerpc64] = "64"
|
||||
MAX_ATOMIC_WIDTH[powerpc64] = "64"
|
||||
|
||||
## powerpc64le-unknown-linux-{gnu, musl}
|
||||
DATA_LAYOUT[powerpc64le] = "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512"
|
||||
LLVM_TARGET[powerpc64le] = "${RUST_TARGET_SYS}"
|
||||
@@ -248,6 +265,8 @@ def arch_to_rust_target_arch(arch):
|
||||
return "mips64"
|
||||
elif arch == "armv7":
|
||||
return "arm"
|
||||
elif arch == "powerpc64le":
|
||||
return "powerpc64"
|
||||
else:
|
||||
return arch
|
||||
|
||||
@@ -289,22 +308,27 @@ TARGET_LLVM_FEATURES = "${@llvm_features(d)}"
|
||||
# (original) target.
|
||||
TARGET_LLVM_FEATURES:class-native = "${@','.join(llvm_features_from_cc_arch(d))}"
|
||||
|
||||
def rust_gen_target(d, thing, wd, features, cpu, arch):
|
||||
def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""):
|
||||
import json
|
||||
sys = sys_for(d, thing)
|
||||
prefix = prefix_for(d, thing)
|
||||
|
||||
features = features or d.getVarFlag('FEATURES', arch) or ""
|
||||
if abi:
|
||||
arch_abi = "{}-{}".format(arch, abi)
|
||||
else:
|
||||
arch_abi = arch
|
||||
|
||||
features = features or d.getVarFlag('FEATURES', arch_abi) or ""
|
||||
features = features.strip()
|
||||
|
||||
# build tspec
|
||||
tspec = {}
|
||||
tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch)
|
||||
tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch)
|
||||
tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch))
|
||||
tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch)
|
||||
tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch)
|
||||
tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch)
|
||||
tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi)
|
||||
tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
|
||||
tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
|
||||
tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
|
||||
tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
|
||||
tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
|
||||
tspec['arch'] = arch_to_rust_target_arch(arch)
|
||||
tspec['os'] = "linux"
|
||||
if "musl" in tspec['llvm-target']:
|
||||
@@ -318,7 +342,6 @@ def rust_gen_target(d, thing, wd, features, cpu, arch):
|
||||
tspec['vendor'] = "unknown"
|
||||
tspec['target-family'] = "unix"
|
||||
tspec['linker'] = "{}{}gcc".format(d.getVar('CCACHE'), prefix)
|
||||
tspec['ar'] = "{}ar".format(prefix)
|
||||
tspec['cpu'] = cpu
|
||||
if features != "":
|
||||
tspec['features'] = features
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
RUST_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config"
|
||||
|
||||
require rust-target.inc
|
||||
require rust.inc
|
||||
|
||||
DEPENDS += "rust-llvm (=${PV})"
|
||||
|
||||
inherit cross-canadian
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require rust-cross-canadian.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
require rust-source.inc
|
||||
require rust-snapshot.inc
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
|
||||
|
||||
@@ -11,13 +11,15 @@ python do_rust_gen_targets () {
|
||||
features = ""
|
||||
cpu = "generic"
|
||||
arch = d.getVar('{}_ARCH'.format(thing))
|
||||
abi = ""
|
||||
if thing is "TARGET":
|
||||
abi = d.getVar('ABIEXTENSION')
|
||||
# arm and armv7 have different targets in llvm
|
||||
if arch == "arm" and target_is_armv7(d):
|
||||
arch = 'armv7'
|
||||
features = d.getVar('TARGET_LLVM_FEATURES') or ""
|
||||
cpu = d.getVar('TARGET_LLVM_CPU')
|
||||
rust_gen_target(d, thing, wd, features, cpu, arch)
|
||||
rust_gen_target(d, thing, wd, features, cpu, arch, abi)
|
||||
}
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
@@ -32,7 +34,7 @@ DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs vir
|
||||
DEPENDS += "rust-native"
|
||||
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}rust"
|
||||
PN = "rust-cross-${TARGET_ARCH}"
|
||||
PN = "rust-cross-${TUNE_PKGARCH}-${TCLIBC}"
|
||||
|
||||
# In the cross compilation case, rustc doesn't seem to get the rpath quite
|
||||
# right. It manages to include '../../lib/${TARGET_PREFIX}', but doesn't
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
require rust-cross.inc
|
||||
require rust-source-${PV}.inc
|
||||
2
recipes-devtools/rust/rust-cross_1.58.1.bb
Normal file
2
recipes-devtools/rust/rust-cross_1.58.1.bb
Normal file
@@ -0,0 +1,2 @@
|
||||
require rust-cross.inc
|
||||
require rust-source.inc
|
||||
@@ -1,7 +1,9 @@
|
||||
SUMMARY = "LLVM compiler framework (packaged with rust)"
|
||||
LICENSE ?= "Apache-2.0-with-LLVM-exception"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
|
||||
SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2"
|
||||
SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
|
||||
file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2"
|
||||
|
||||
S = "${RUSTSRC}/src/llvm-project/llvm"
|
||||
|
||||
@@ -14,6 +16,11 @@ DEPENDS += "ninja-native rust-llvm-native"
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv4t = "arm"
|
||||
|
||||
# rustc_llvm with debug info is not recognized as a valid crate that's
|
||||
# generated by rust-llvm-native.
|
||||
CFLAGS:remove = "-g"
|
||||
CXXFLAGS:remove = "-g"
|
||||
|
||||
LLVM_DIR = "llvm${LLVM_RELEASE}"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 86940d87026432683fb6741cd8a34d3b9b18e40d Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Fri, 27 Nov 2020 10:11:08 +0000
|
||||
Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well
|
||||
|
||||
Otherwise, there are instances which are identical in
|
||||
every other field and therefore sort non-reproducibly
|
||||
(which breaks binary and source reproducibiliy).
|
||||
|
||||
Upstream-Status: Submitted [https://reviews.llvm.org/D97477]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
|
||||
index ccf0959389b..1f801e83b7d 100644
|
||||
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
|
||||
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
|
||||
@@ -359,7 +359,10 @@ public:
|
||||
// name of a class shouldn't be significant. However, some of the backends
|
||||
// accidentally rely on this behaviour, so it will have to stay like this
|
||||
// until they are fixed.
|
||||
- return ValueName < RHS.ValueName;
|
||||
+ if (ValueName != RHS.ValueName)
|
||||
+ return ValueName < RHS.ValueName;
|
||||
+ // All else being equal, we should sort by name, for source and binary reproducibility
|
||||
+ return Name < RHS.Name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 3b7e611bd58ba842470d17374c550e14bceca5c7 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Tue, 10 Nov 2020 14:55:25 +0100
|
||||
Subject: [PATCH] [nfc] Fix missing include
|
||||
|
||||
Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
llvm/utils/benchmark/src/benchmark_register.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
|
||||
index 0705e219f2fa..4caa5ad4da07 100644
|
||||
--- a/llvm/utils/benchmark/src/benchmark_register.h
|
||||
+++ b/llvm/utils/benchmark/src/benchmark_register.h
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef BENCHMARK_REGISTER_H
|
||||
#define BENCHMARK_REGISTER_H
|
||||
|
||||
+#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include "check.h"
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -8,6 +8,7 @@ return the libraries, include directories, etc. from inside the sysroot rather
|
||||
than from the native sysroot. Thus provide an env override for calling
|
||||
llvm-config from a target sysroot.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Martin Kelly <mkelly@xevo.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
|
||||
#
|
||||
LLVM_RELEASE = "11.0.1"
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
|
||||
SRC_URI += "file://0001-nfc-Fix-missing-include.patch;striplevel=2"
|
||||
5
recipes-devtools/rust/rust-llvm_1.58.1.bb
Normal file
5
recipes-devtools/rust/rust-llvm_1.58.1.bb
Normal file
@@ -0,0 +1,5 @@
|
||||
# check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
|
||||
#
|
||||
LLVM_RELEASE = "13.0.0"
|
||||
require rust-source.inc
|
||||
require rust-llvm.inc
|
||||
@@ -1,18 +0,0 @@
|
||||
require rust-snapshot.inc
|
||||
|
||||
## This is information on the rust-snapshot (binary) used to build our current release.
|
||||
## snapshot info is taken from rust/src/stage0.txt
|
||||
## TODO: find a way to add additional SRC_URIs based on the contents of an
|
||||
## earlier SRC_URI.
|
||||
RS_VERSION = "1.50.0"
|
||||
CARGO_VERSION = "1.50.0"
|
||||
|
||||
# TODO: Add hashes for other architecture toolchains as well. Make a script?
|
||||
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "f1eb68db2b28a56ed8701edba7cf3688011d903ca12ff9d85bd21d3f8f614792"
|
||||
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "9bebd360bcd9b5bb58f2a02930b9db4ae291adef259c96377f1f4cbd240bcf86"
|
||||
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "3cb2c68e987e5681fca9c930973f408a71151b1b255e69669a08e54d446ee803"
|
||||
|
||||
SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "1a1b1a540d531c89e866083f84ef67125dee108844e4e415b07c3a1000006544"
|
||||
SRC_URI[rustc-snapshot-aarch64.sha256sum] = "9b956d97d7e428ecd8634d467659ebdb5bd79c387b88363be8749eddd7f98756"
|
||||
SRC_URI[cargo-snapshot-aarch64.sha256sum] = "f3c772f455406f67991ac20cff56a4fcd2d01454e29280c566119ab5180307ea"
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
## This is information on the rust-snapshot (binary) used to build our current release.
|
||||
## snapshot info is taken from rust/src/stage0.txt
|
||||
## TODO: find a way to add additional SRC_URIs based on the contents of an
|
||||
## earlier SRC_URI.
|
||||
RS_VERSION = "1.57.0"
|
||||
CARGO_VERSION = "1.57.0"
|
||||
|
||||
# TODO: Add hashes for other architecture toolchains as well. Make a script?
|
||||
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
|
||||
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86"
|
||||
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
|
||||
|
||||
SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "3618da916a0f92f241cf1d67d04bb57835b303cf2047b57dc2f2487b89a4fc1f"
|
||||
SRC_URI[rustc-snapshot-aarch64.sha256sum] = "f26811e48d03c56c125de03d389e1ae7c6df36990953c1670c6a5676bc12d4cb"
|
||||
SRC_URI[cargo-snapshot-aarch64.sha256sum] = "6d11cd94618d80cda273eeeae7285980445f61a49ebacc616777b482a41cbf3f"
|
||||
|
||||
SRC_URI += " \
|
||||
https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||
https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
require rust-source.inc
|
||||
|
||||
SRC_URI[rust.sha256sum] = "92c68a91fca33cbafb83442cde722d010cc387dc1ee8a2680e2fb33a575821a1"
|
||||
@@ -1,3 +1,7 @@
|
||||
SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust"
|
||||
SRC_URI[rust.sha256sum] = "2b3643a48e7087053b0268971ec4154350342508922a8acb0707aaf94deb4469"
|
||||
|
||||
RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html"
|
||||
UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require rust-tools-cross-canadian.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
require rust-source.inc
|
||||
require rust-snapshot.inc
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
|
||||
|
||||
@@ -50,9 +50,18 @@ do_rust_setup_snapshot () {
|
||||
# and fail without it there.
|
||||
mkdir -p ${RUSTSRC}/build/${BUILD_SYS}
|
||||
ln -sf ${WORKDIR}/rust-snapshot/ ${RUSTSRC}/build/${BUILD_SYS}/stage0
|
||||
|
||||
# Need to use uninative's loader if enabled/present since the library paths
|
||||
# are used internally by rust and result in symbol mismatches if we don't
|
||||
if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
|
||||
for bin in cargo rustc rustdoc; do
|
||||
patchelf-uninative ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER}
|
||||
done
|
||||
fi
|
||||
}
|
||||
addtask rust_setup_snapshot after do_unpack before do_configure
|
||||
do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"
|
||||
do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
|
||||
|
||||
python do_configure() {
|
||||
import json
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
require rust-target.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
|
||||
SRC_URI += " \
|
||||
file://riscv-march.patch \
|
||||
file://rv64gc.patch \
|
||||
"
|
||||
|
||||
do_compile () {
|
||||
rust_runx build --stage 2
|
||||
}
|
||||
|
||||
rust_do_install() {
|
||||
rust_runx install
|
||||
}
|
||||
21
recipes-devtools/rust/rust_1.58.1.bb
Normal file
21
recipes-devtools/rust/rust_1.58.1.bb
Normal file
@@ -0,0 +1,21 @@
|
||||
require rust-target.inc
|
||||
require rust-source.inc
|
||||
require rust-snapshot.inc
|
||||
|
||||
INSANE_SKIP:${PN}:class-native = "already-stripped"
|
||||
|
||||
do_compile () {
|
||||
rust_runx build --stage 2
|
||||
}
|
||||
|
||||
rust_do_install() {
|
||||
rust_runx install
|
||||
}
|
||||
|
||||
python () {
|
||||
pn = d.getVar('PN')
|
||||
|
||||
if not pn.endswith("-native"):
|
||||
raise bb.parse.SkipRecipe("Rust recipe doesn't work for target builds at this time. Fixes welcome.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user