On Tue, Apr 19, 2022 at 01:39:04AM +0200, Jeremie Courreges-Anglas wrote: > > codeblocks doesn't build any more on riscv64, I had to duplicate the > aarch64 #define goo in the embedded copy of nspr or something. This > should be safe, riscv64 is a little-endian LP64 arch like aarch64 or > amd64. > > This was present in the 7.1 packages release builds, I just didn't send > it early enough. No bump needed as it only affects riscv64. > > ok?
The patch integrates, but I have no way to test it as I only have amd64 and i386 available to me. I'd prefer a revision bump, just to cover all the bases. > > Index: > patches/patch-src_sdk_mozilla_chardet_include_nsprpub_pr_include_prcpucfg_linux_h > =================================================================== > RCS file: > patches/patch-src_sdk_mozilla_chardet_include_nsprpub_pr_include_prcpucfg_linux_h > diff -N > patches/patch-src_sdk_mozilla_chardet_include_nsprpub_pr_include_prcpucfg_linux_h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ > patches/patch-src_sdk_mozilla_chardet_include_nsprpub_pr_include_prcpucfg_linux_h > 30 Mar 2022 02:25:43 -0000 > @@ -0,0 +1,56 @@ > +Index: src/sdk/mozilla_chardet/include/nsprpub/pr/include/prcpucfg_linux.h > +--- src/sdk/mozilla_chardet/include/nsprpub/pr/include/prcpucfg_linux.h.orig > ++++ src/sdk/mozilla_chardet/include/nsprpub/pr/include/prcpucfg_linux.h > +@@ -643,6 +643,52 @@ > + #define PR_BYTES_PER_WORD_LOG2 3 > + #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(__hppa__) > + > + #undef IS_LITTLE_ENDIAN > > > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE >