[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1014598: jsonnet: please add support for riscv64



Source: jsonnet
Version: 0.17.0+ds-2
Severity: wishlist
Tags: ftbfs, patch, upstream
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv@lists.debian.org

Dear jsonnet Maintainer,

Please add support for riscv64 with patch attached.
I have built riscv64 package on my real riscv64 hardware(Unmatched board)
with it.

Please let me know if you need my assistant.

PS: the patch is for rapidyaml only. So don't forget to add 
riscv64 arch in d/control :)

Bo
-- 
Best Regards,

--- a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/cpu.hpp
+++ b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/cpu.hpp
@@ -84,6 +84,12 @@
 #       define C4_CPU_PPC
 #       define C4_WORDSIZE 4
 #   endif
+
+#elif defined(__riscv) && __riscv_xlen == 64
+#   define C4_CPU_RV64
+#   define C4_WORDSIZE 8
+#   define C4_BYTE_ORDER _C4EL
+
 #elif defined(SWIG)
 #else
 #   error "unknown CPU architecture"
--- a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include/fast_float/float_common.h
+++ b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include/fast_float/float_common.h
@@ -9,7 +9,8 @@
        || defined(__amd64) || defined(__aarch64__) || defined(_M_ARM64) \
        || defined(__MINGW64__)                                          \
        || defined(__s390x__)                                            \
-       || (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__)))
+       || (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) \
+       || defined(__PPC64LE__) || defined(__riscv) && __riscv_xlen == 64))
 #define FASTFLOAT_64BIT
 #elif (defined(__i386) || defined(__i386__) || defined(_M_IX86)   \
      || defined(__arm__)                                        \
@@ -337,4 +338,4 @@
   return out;
 }
 
-#endif
\ No newline at end of file
+#endif

Attachment: signature.asc
Description: PGP signature


Reply to: