Source: sigscheme
Version: 0.9.1-2
Severity: normal
Tags: FTBFS patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the sigscheme failed for loong64 in the Debian Package Auto-Building environment.
The build error log is as follows,
```
In file included from ./include/private/gc_priv.h:68,
                 from mach_dep.c:16:
./include/private/gcconfig.h:496:5: error: #error "The collector has not been ported to this machine/OS combination."   496 | #   error "The collector has not been ported to this machine/OS combination."
      |     ^~~~~
......
```
The full log can be found at https://buildd.debian.org/status/logs.php?pkg=sigscheme&ver=0.9.1-2&arch=loong64.
Build failed 14 times.

Please consider the patch I attached.
I have built sigscheme successfully in my local ENV.
```
......
dpkg-deb: building package 'libgcroots-dev' in '../libgcroots-dev_0.9.1-2+loong64_loong64.deb'.
 dpkg-genbuildinfo -O../sigscheme_0.9.1-2+loong64_loong64.buildinfo
 dpkg-genchanges -O../sigscheme_0.9.1-2+loong64_loong64.changes
dpkg-genchanges: info: not including original source code in upload
 dpkg-source --after-build .
```
Your opinions are welcome.

Thanks,
Dandan Zhang

diff -Nru sigscheme-0.9.1/debian/changelog sigscheme-0.9.1/debian/changelog
--- sigscheme-0.9.1/debian/changelog    2022-06-27 00:39:24.000000000 +0000
+++ sigscheme-0.9.1/debian/changelog    2024-06-18 09:22:24.000000000 +0000
@@ -1,3 +1,9 @@
+sigscheme (0.9.1-2+loong64) unreleased; urgency=medium
+
+  * Add support for LoongArch.
+
+ -- Dandan Zhang <zhangdan...@loongson.cn>  Tue, 18 Jun 2024 09:22:24 +0000
+
 sigscheme (0.9.1-2) unstable; urgency=medium
 
   * QA upload.
diff -Nru sigscheme-0.9.1/debian/patches/series 
sigscheme-0.9.1/debian/patches/series
--- sigscheme-0.9.1/debian/patches/series       2020-08-25 05:45:19.000000000 
+0000
+++ sigscheme-0.9.1/debian/patches/series       2024-06-18 09:22:24.000000000 
+0000
@@ -1,3 +1,4 @@
 test-gc-protect-coll-0.8.3
 test-storage-coll-0.8.3
 support-automake-test-log-driver
+sigscheme-add-LoongArch-support.patch
diff -Nru sigscheme-0.9.1/debian/patches/sigscheme-add-LoongArch-support.patch 
sigscheme-0.9.1/debian/patches/sigscheme-add-LoongArch-support.patch
--- sigscheme-0.9.1/debian/patches/sigscheme-add-LoongArch-support.patch        
1970-01-01 00:00:00.000000000 +0000
+++ sigscheme-0.9.1/debian/patches/sigscheme-add-LoongArch-support.patch        
2024-06-18 09:22:24.000000000 +0000
@@ -0,0 +1,43 @@
+Description: Add support for LoongArch 
+ .
+ sigscheme (0.9.1-2+loong64) unreleased; urgency=medium
+ .
+   * Add support for LoongArch.
+Author: Dandan Zhang <zhangdan...@loongson.cn>
+
+---
+Last-Update: 2024-06-18
+
+--- sigscheme-0.9.1.orig/libgcroots/include/private/gcconfig.h
++++ sigscheme-0.9.1/libgcroots/include/private/gcconfig.h
+@@ -483,6 +483,10 @@
+ #   define RISCV
+ #   define mach_type_known
+ # endif
++# if defined(__loongarch__) && defined(LINUX)
++#   define LOONGARCH
++#   define mach_type_known
++# endif
+ 
+ /* Feel free to add more clauses here */
+ 
+@@ -1336,6 +1340,19 @@
+ #   endif
+ # endif /* RISCV */
+ 
++# ifdef LOONGARCH
++#   define MACH_TYPE "LoongArch"
++#   define CPP_WORDSZ _LOONGARCH_SZPTR
++#   define ALIGNMENT (_LOONGARCH_SZPTR/8)
++#   ifdef LINUX
++#     define OS_TYPE "LINUX"
++      extern int __data_start[];
++#     define DATASTART ((ptr_t)__data_start)
++#     define LINUX_STACKBOTTOM
++#     define DYNAMIC_LOADING
++#   endif
++# endif /* LoongArch */
++
+ # ifdef NS32K
+ #   define MACH_TYPE "NS32K"
+ #   define ALIGNMENT 4

Reply via email to