Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
Andrew Jeffery | ecdf5f1 | 2022-03-01 01:09:46 +1030 | [diff] [blame] | 7 | # Handle mismatches between `uname -m`-style output and Rust's arch names |
| 8 | def arch_to_rust_arch(arch): |
| 9 | if arch == "ppc64le": |
| 10 | return "powerpc64le" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 11 | if arch in ('riscv32', 'riscv64'): |
| 12 | return arch + 'gc' |
Andrew Jeffery | ecdf5f1 | 2022-03-01 01:09:46 +1030 | [diff] [blame] | 13 | return arch |