Source: rust-target
Version: 2.0.0-1
Severity: wishlist
Tags: ftbfs patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the rust-target package failed for loong64 in the Debian Package Auto-Building environment, the error log is as follows:
```
error[E0308]: mismatched types
  --> src/lib.rs:23:18
   |
23 | pub fn arch() -> &'static str {
   |        ----      ^^^^^^^^^^^^ expected `&str`, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression

For more information about this error, try `rustc --explain E0308`.
```

The full build log can be found at https://buildd.debian.org/status/logs.php?pkg=rust-target&ver=2.0.0-1&arch=loong64.

The support for LoongArch architecture has been included in rust-target upstream, please see https://github.com/casey/target/pull/14.
You can also consider the patch I attached.
Your opinions are welcome.

Thanks,
Dandan Zhang

Description: Add loongarch64 support 
Applied-Upstream: https://github.com/casey/target/pull/14 
Signed-Off-By: heiher
Last-Update: 2024-04-02

--- rust-target-2.0.0.orig/src/lib.rs
+++ rust-target-2.0.0/src/lib.rs
@@ -29,6 +29,7 @@ pub fn arch() -> &'static str {
     "avr",
     "hexagon",
     "le32",
+    "loongarch64",
     "mips",
     "mips64",
     "msp430",

Reply via email to