Source: debugedit
Version: 1:5.0-5
Severity: normal
Tags: FTBFS patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the debugedit failed for loong64 in the Debian Package Auto-Building environment.
The build error log is as follows,
```
ERROR: All 26 tests were run,
14 failed unexpectedly.
......
```
The full log can be found at https://buildd.debian.org/status/logs.php?pkg=debugedit&ver=1%3A5.0-5%2Bb1&arch=loong64.
Build failed 4 times.

Please consider the patch I attached.
I have built debugedit successfully in my local ENV.
```
......
dpkg-deb: building package 'debugedit-dbgsym' in '../debugedit-dbgsym_5.0-5+loong64_loong64.deb'.
 dpkg-genbuildinfo -O../debugedit_5.0-5+loong64_loong64.buildinfo
 dpkg-genchanges -O../debugedit_5.0-5+loong64_loong64.changes
```
Your opinions are welcome.

Thanks,
Dandan Zhang

diff -Nru debugedit-5.0/debian/changelog debugedit-5.0/debian/changelog
--- debugedit-5.0/debian/changelog      2022-07-19 15:28:07.000000000 +0000
+++ debugedit-5.0/debian/changelog      2024-06-21 06:37:35.000000000 +0000
@@ -1,3 +1,9 @@
+debugedit (1:5.0-5+loong64) unreleased; urgency=medium
+
+  * Add support for LoongArch.
+
+ -- Dandan Zhang <zhangdan...@loongson.cn>  Fri, 21 Jun 2024 14:37:35 +0800
+
 debugedit (1:5.0-5) unstable; urgency=medium
 
   * Update from the trunk 20220421.
diff -Nru debugedit-5.0/debian/patches/debugedit-add-loongarch-support.patch 
debugedit-5.0/debian/patches/debugedit-add-loongarch-support.patch
--- debugedit-5.0/debian/patches/debugedit-add-loongarch-support.patch  
1970-01-01 00:00:00.000000000 +0000
+++ debugedit-5.0/debian/patches/debugedit-add-loongarch-support.patch  
2024-06-21 06:37:35.000000000 +0000
@@ -0,0 +1,25 @@
+Description: Add support for LoongArch. 
+ .
+ debugedit (1:5.0-5+loong64) unreleased; urgency=medium
+ .
+   * Add support for LoongArch.
+Author: Dandan Zhang <zhangdan...@loongson.cn>
+
+---
+Last-Update: 2024-06-20
+
+--- debugedit-5.0.orig/tools/debugedit.c
++++ debugedit-5.0/tools/debugedit.c
+@@ -607,6 +607,12 @@ setup_relbuf (DSO *dso, debug_section *s
+           goto fail;
+         break;
+ #endif
++#if defined(EM_LOONGARCH) && defined(R_LARCH_32)
++      case EM_LOONGARCH:
++        if (rtype != R_LARCH_32)
++          goto fail;
++        break;
++#endif
+ #if defined(EM_MCST_ELBRUS) && defined(R_E2K_32_ABS)
+       case EM_MCST_ELBRUS:
+         if (rtype != R_E2K_32_ABS)
diff -Nru debugedit-5.0/debian/patches/series 
debugedit-5.0/debian/patches/series
--- debugedit-5.0/debian/patches/series 2022-07-19 15:28:07.000000000 +0000
+++ debugedit-5.0/debian/patches/series 2024-06-21 06:37:35.000000000 +0000
@@ -1,2 +1,3 @@
 git-updates.diff
 gcc-driver.diff
+debugedit-add-loongarch-support.patch

Reply via email to