diff options
-rw-r--r-- | meta/classes-recipe/rust-common.bbclass | 6 | ||||
-rw-r--r-- | meta/classes-recipe/rust-target-config.bbclass | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes-recipe/rust-common.bbclass b/meta/classes-recipe/rust-common.bbclass index 3338de7502..0f72e45e8c 100644 --- a/meta/classes-recipe/rust-common.bbclass +++ b/meta/classes-recipe/rust-common.bbclass | |||
@@ -66,6 +66,12 @@ def rust_base_triple(d, thing): | |||
66 | elif "musl" in os: | 66 | elif "musl" in os: |
67 | libc = "-musl" | 67 | libc = "-musl" |
68 | os = "linux" | 68 | os = "linux" |
69 | elif "elf" in os: | ||
70 | libc = "-elf" | ||
71 | os = "none" | ||
72 | elif "eabi" in os: | ||
73 | libc = "-eabi" | ||
74 | os = "none" | ||
69 | 75 | ||
70 | return arch + vendor + '-' + os + libc | 76 | return arch + vendor + '-' + os + libc |
71 | 77 | ||
diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass index 2710b4325d..7fd7128bcf 100644 --- a/meta/classes-recipe/rust-target-config.bbclass +++ b/meta/classes-recipe/rust-target-config.bbclass | |||
@@ -355,7 +355,10 @@ def rust_gen_target(d, thing, wd, arch): | |||
355 | tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) | 355 | tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) |
356 | tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) | 356 | tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) |
357 | tspec['arch'] = arch_to_rust_target_arch(rust_arch) | 357 | tspec['arch'] = arch_to_rust_target_arch(rust_arch) |
358 | tspec['os'] = "linux" | 358 | if "baremetal" in d.getVar('TCLIBC'): |
359 | tspec['os'] = "none" | ||
360 | else: | ||
361 | tspec['os'] = "linux" | ||
359 | if "musl" in tspec['llvm-target']: | 362 | if "musl" in tspec['llvm-target']: |
360 | tspec['env'] = "musl" | 363 | tspec['env'] = "musl" |
361 | else: | 364 | else: |