summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/files/rv64gc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rust/files/rv64gc.patch')
-rw-r--r--meta/recipes-devtools/rust/files/rv64gc.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/rv64gc.patch b/meta/recipes-devtools/rust/files/rv64gc.patch
new file mode 100644
index 0000000000..aab1e18453
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/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"),