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

Bug#1010381: commons-daemon: FTBFS on riscv64: error: Unsupported CPU architecture "riscv64"



Source: commons-daemon
Version: 1.0.15-8
Severity: normal
Tags: ftbfs patch
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv@lists.debian.org

Dear Maintainer,

The commons-daemon has a ftbfs issue on riscv64:

```
...
configure:2916: result: none needed
configure:2979: checking for ranlib
configure:2995: found /usr/bin/ranlib
configure:3006: result: ranlib
configure:3071: checking for strip
configure:3087: found /usr/bin/strip
configure:3098: result: strip
configure:3126: checking C flags dependant on host system type
configure:3294: result: failed
configure:3296: error: Unsupported CPU architecture "riscv64"
...
```
The full buildd log is:
https://buildd.debian.org/status/fetch.php?pkg=commons-daemon&arch=riscv64&ver=1.0.15-8&stamp=1558276470&raw=0

The attach patch is for supporting build on riscv64. And I have tested it locally
that is ok. If you need me to do some extra tests please tell me.

BR,
Bo
add support for risv64 arch

Bo YU <tsu.yubo@gmail.com>
--- a/src/native/unix/configure
+++ b/src/native/unix/configure
@@ -2707,6 +2707,11 @@
     supported_os="ppc64le"
     HOST_CPU=ppc64le
     ;;
+  riscv64)
+    CFLAGS="$CFLAGS -DCPU=\\\"riscv64\\\""
+    supported_os="riscv64"
+    HOST_CPU=riscv64
+    ;;
   *)
     echo "$as_me:$LINENO: result: failed" >&5
 echo "${ECHO_T}failed" >&6
--- a/src/native/unix/support/apsupport.m4
+++ b/src/native/unix/support/apsupport.m4
@@ -186,6 +186,11 @@
     supported_os="ppc64le"
     HOST_CPU=ppc64le
     ;;
+  riscv64)
+    CFLAGS="$CFLAGS -DCPU=\\\"riscv64\\\""
+    supported_os="riscv64"
+    HOST_CPU=riscv64
+    ;;
   *)
     AC_MSG_RESULT([failed])
     AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;

Reply to: