[Git][haskell-team/DHG_packages][master] 2 commits: Increase support for RISC-V architecture

Gianfranco Costamagna (@locutusofborg) gitlab at salsa.debian.org
Tue Sep 9 09:35:13 BST 2025



Gianfranco Costamagna pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
0d9ac5ea by dingchenguang at 2025-09-08T15:22:58+08:00
Increase support for RISC-V architecture

- - - - -
b75f7ccd by dingchenguang at 2025-09-08T15:22:58+08:00
Modify file permissions

- - - - -


2 changed files:

- + p/haskell-charsetdetect-ae/debian/patches/add-riscv-support.patch
- p/haskell-charsetdetect-ae/debian/patches/series


Changes:

=====================================
p/haskell-charsetdetect-ae/debian/patches/add-riscv-support.patch
=====================================
@@ -0,0 +1,178 @@
+--- haskell-charsetdetect-ae-1.1.0.4.orig/libcharsetdetect/nspr-emu/prcpucfg_freebsd.h
++++ haskell-charsetdetect-ae-1.1.0.4/libcharsetdetect/nspr-emu/prcpucfg_freebsd.h
+@@ -283,6 +283,53 @@
+ #define PR_ALIGN_OF_POINTER 8
+ #define PR_ALIGN_OF_WORD    8
+ 
++#elif defined(__riscv) && __riscv_xlen == 64
++
++#define IS_LITTLE_ENDIAN 1
++#undef  IS_BIG_ENDIAN
++#define HAVE_ALIGNED_DOUBLES
++#define HAVE_ALIGNED_LONGLONGS
++#define IS_64
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   8
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   8
++#define PR_BYTES_PER_DWORD  8
++#define PR_BYTES_PER_WORD_LOG2   3
++#define PR_BYTES_PER_DWORD_LOG2  3
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    64
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    64
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   6
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   6
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    8
++#define PR_ALIGN_OF_INT64   8
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  8
++#define PR_ALIGN_OF_POINTER 8
++#define PR_ALIGN_OF_WORD    8
++
+ #elif defined(__loongarch64)
+ 
+ #define IS_LITTLE_ENDIAN 1
+--- haskell-charsetdetect-ae-1.1.0.4.orig/libcharsetdetect/nspr-emu/prcpucfg_linux.h
++++ haskell-charsetdetect-ae-1.1.0.4/libcharsetdetect/nspr-emu/prcpucfg_linux.h
+@@ -412,6 +412,52 @@
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
++#elif defined(__riscv) && __riscv_xlen == 64
++
++#define IS_LITTLE_ENDIAN 1
++#undef  IS_BIG_ENDIAN
++#define IS_64
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   8
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   8
++#define PR_BYTES_PER_DWORD  8
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    64
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    64
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   6
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   6
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    8
++#define PR_ALIGN_OF_INT64   8
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  8
++#define PR_ALIGN_OF_POINTER 8
++#define PR_ALIGN_OF_WORD    8
++
++#define PR_BYTES_PER_WORD_LOG2  3
++#define PR_BYTES_PER_DWORD_LOG2 3
++
+ #elif defined(__loongarch64)
+ 
+ #define IS_LITTLE_ENDIAN 1
+--- haskell-charsetdetect-ae-1.1.0.4.orig/libcharsetdetect/nspr-emu/prcpucfg_openbsd.h
++++ haskell-charsetdetect-ae-1.1.0.4/libcharsetdetect/nspr-emu/prcpucfg_openbsd.h
+@@ -283,6 +283,53 @@
+ #define PR_ALIGN_OF_POINTER 8
+ #define PR_ALIGN_OF_WORD    8
+ 
++#elif defined(__riscv) && __riscv_xlen == 64
++
++#define IS_LITTLE_ENDIAN 1
++#undef  IS_BIG_ENDIAN
++#define HAVE_ALIGNED_DOUBLES
++#define HAVE_ALIGNED_LONGLONGS
++#define IS_64
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   8
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   8
++#define PR_BYTES_PER_DWORD  8
++#define PR_BYTES_PER_WORD_LOG2   3
++#define PR_BYTES_PER_DWORD_LOG2  3
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    64
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    64
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   6
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   6
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    8
++#define PR_ALIGN_OF_INT64   8
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  8
++#define PR_ALIGN_OF_POINTER 8
++#define PR_ALIGN_OF_WORD    8
++
+ #elif defined(__loongarch64)
+ 
+ #define IS_LITTLE_ENDIAN 1
+--- haskell-charsetdetect-ae-1.1.0.4.orig/libcharsetdetect/nspr-emu/prcpucfg_win.h
++++ haskell-charsetdetect-ae-1.1.0.4/libcharsetdetect/nspr-emu/prcpucfg_win.h
+@@ -100,7 +100,7 @@
+ #define PR_BYTES_PER_WORD_LOG2	2
+ #define PR_BYTES_PER_DWORD_LOG2	2
+ 
+-#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined(__x86_64) ||  defined(__loongarch64)
++#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined(__x86_64) || defined(__loongarch64) || (defined(__riscv) && __riscv_xlen == 64)
+ 
+ #define IS_LITTLE_ENDIAN 1
+ #undef  IS_BIG_ENDIAN


=====================================
p/haskell-charsetdetect-ae/debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 kfreebsd
 add-loongarch-support.patch
+add-riscv-support.patch



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/ad1a5ecf0d2e50677c2801445962bd62bb67d36a...b75f7ccd1df53d82a7ab976a1ba32e333ee90cc8

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/ad1a5ecf0d2e50677c2801445962bd62bb67d36a...b75f7ccd1df53d82a7ab976a1ba32e333ee90cc8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20250909/ba4c13ba/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list