This commit switches to use the LoongArch's built-in rustc target 'loongarch64-unknown-none-softfloat'. The Rust samples have been tested.
Showing the changes to scripts (2 of 4 files). Show all
Unified · Split
| @@ -12,7 +12,7 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert · 11 unmodified lines | |||
| 12 | hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder | 12 | hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder |
| 13 | hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen | 13 | hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen |
| 14 | 14 | ||
| 15 | ifneq ($(or $(CONFIG_X86_64),$(CONFIG_LOONGARCH)),) | 15 | ifdef CONFIG_X86_64 |
| 16 | always-$(CONFIG_RUST) += target.json | 16 | always-$(CONFIG_RUST) += target.json |
| 17 | filechk_rust_target = $< < include/config/auto.conf | 17 | filechk_rust_target = $< < include/config/auto.conf |
| 18 | 18 | ||
| @@ -164,12 +164,7 @@ fn main() { · 163 unmodified lines | |||
| 164 | ts.push("llvm-target", "x86_64-linux-gnu"); | 164 | ts.push("llvm-target", "x86_64-linux-gnu"); |
| 165 | ts.push("target-pointer-width", "64"); | 165 | ts.push("target-pointer-width", "64"); |
| 166 | } else if cfg.has("LOONGARCH") { | 166 | } else if cfg.has("LOONGARCH") { |
| 167 | ts.push("arch", "loongarch64"); | 167 | panic!("loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target"); |
| 168 | ts.push("data-layout", "e-m:e-p:64:64-i64:64-i128:128-n64-S128"); | ||
| 169 | ts.push("features", "-f,-d"); | ||
| 170 | ts.push("llvm-target", "loongarch64-linux-gnusf"); | ||
| 171 | ts.push("llvm-abiname", "lp64s"); | ||
| 172 | ts.push("target-pointer-width", "64"); | ||
| 173 | } else { | 168 | } else { |
| 174 | panic!("Unsupported architecture"); | 169 | panic!("Unsupported architecture"); |
| 175 | } | 170 | } |