Source: poco
Version: 1.9.0-2
Severity: normal
Tags: patch upstream
User: debian-ri...@lists.debian.org
Usertags: riscv64

Hello,

We need support in this package for the riscv64 architecture.

I am attaching a patch that adds support.  It applies cleanly when added last in
the "series" file.

Without it, it simply FTBFS since it doesn't know about the architecture.

It would be great if you could include these changes and release a new version
for unstable soonish.


Thanks and cheers.
--
Manuel A. Fernandez Montecelo <m...@debian.org>
Index: poco-1.9.0/Foundation/include/Poco/Platform.h
===================================================================
--- poco-1.9.0.orig/Foundation/include/Poco/Platform.h
+++ poco-1.9.0/Foundation/include/Poco/Platform.h
@@ -134,6 +134,7 @@
 #define POCO_ARCH_NIOS2   0x0e
 #define POCO_ARCH_AARCH64 0x0f
 #define POCO_ARCH_ARM64   0x0f // same as POCO_ARCH_AARCH64
+#define POCO_ARCH_RISCV64 0x10
 
 
 #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || 
defined(_M_ALPHA)
@@ -224,6 +225,9 @@
 #elif defined(__AARCH64EB__)
        #define POCO_ARCH POCO_ARCH_AARCH64
        #define POCO_ARCH_BIG_ENDIAN 1
+#elif defined(__riscv) && (__riscv_xlen == 64)
+       #define POCO_ARCH POCO_ARCH_RISCV64
+       #define POCO_ARCH_LITTLE_ENDIAN 1
 #endif
 
 
Index: poco-1.9.0/Foundation/src/utils.h
===================================================================
--- poco-1.9.0.orig/Foundation/src/utils.h
+++ poco-1.9.0/Foundation/src/utils.h
@@ -62,6 +62,7 @@
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
     defined(__SH4__) || defined(__alpha__) || \
     defined(_MIPS_ARCH_MIPS32R2) || \
+    defined(__riscv) || \
     defined(__AARCH64EL__) || \
     defined(nios2) || defined(__nios2) || defined(__nios2__)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
diff -Nru poco-1.9.0/debian/changelog poco-1.9.0/debian/changelog
--- poco-1.9.0/debian/changelog 2018-04-06 13:39:17.000000000 +0200
+++ poco-1.9.0/debian/changelog 2018-05-05 22:59:49.000000000 +0200
@@ -1,3 +1,10 @@
+poco (1.9.0-2+0.riscv64.1) unreleased; urgency=medium
+
+  * Non-maintainer upload.
+  * riscv64: add support
+
+ -- Manuel A. Fernandez Montecelo <m...@debian.org>  Sat, 05 May 2018 20:59:49 
+0000
+
 poco (1.9.0-2) unstable; urgency=medium
 
   * Upload to unstable.
diff -Nru poco-1.9.0/debian/patches/riscv64-support.patch 
poco-1.9.0/debian/patches/riscv64-support.patch
--- poco-1.9.0/debian/patches/riscv64-support.patch     1970-01-01 
01:00:00.000000000 +0100
+++ poco-1.9.0/debian/patches/riscv64-support.patch     2018-05-05 
22:59:43.000000000 +0200
@@ -0,0 +1,34 @@
+Index: poco-1.9.0/Foundation/include/Poco/Platform.h
+===================================================================
+--- poco-1.9.0.orig/Foundation/include/Poco/Platform.h
++++ poco-1.9.0/Foundation/include/Poco/Platform.h
+@@ -134,6 +134,7 @@
+ #define POCO_ARCH_NIOS2   0x0e
+ #define POCO_ARCH_AARCH64 0x0f
+ #define POCO_ARCH_ARM64   0x0f // same as POCO_ARCH_AARCH64
++#define POCO_ARCH_RISCV64 0x10
+ 
+ 
+ #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || 
defined(_M_ALPHA)
+@@ -224,6 +225,9 @@
+ #elif defined(__AARCH64EB__)
+       #define POCO_ARCH POCO_ARCH_AARCH64
+       #define POCO_ARCH_BIG_ENDIAN 1
++#elif defined(__riscv) && (__riscv_xlen == 64)
++      #define POCO_ARCH POCO_ARCH_RISCV64
++      #define POCO_ARCH_LITTLE_ENDIAN 1
+ #endif
+ 
+ 
+Index: poco-1.9.0/Foundation/src/utils.h
+===================================================================
+--- poco-1.9.0.orig/Foundation/src/utils.h
++++ poco-1.9.0/Foundation/src/utils.h
+@@ -62,6 +62,7 @@
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+     defined(_MIPS_ARCH_MIPS32R2) || \
++    defined(__riscv) || \
+     defined(__AARCH64EL__) || \
+     defined(nios2) || defined(__nios2) || defined(__nios2__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
diff -Nru poco-1.9.0/debian/patches/series poco-1.9.0/debian/patches/series
--- poco-1.9.0/debian/patches/series    2018-02-28 21:00:38.000000000 +0100
+++ poco-1.9.0/debian/patches/series    2018-05-05 22:59:44.000000000 +0200
@@ -6,3 +6,4 @@
 0007-Switch-FreeBSD-to-poll.patch
 0009-Link-against-dl-on-FreeBSD.patch
 MySQL-5.7-compatibility.patch
+riscv64-support.patch

Reply via email to