Source: liburcu
Version: 0.14.0-3.1
Severity: normal
Tags: ftbfs patch
User: debian-loonga...@lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the liburcu failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
../include/urcu/uatomic.h:57:2: error: #error "Cannot build:
unrecognized architecture, see <urcu/arch.h>."
57 | #error "Cannot build: unrecognized architecture, see
<urcu/arch.h>."
| ^~~~~
In file included from ../include/urcu/static/wfstack.h:34,
from wfstack.c:25:
../include/urcu/uatomic.h:57:2: error: #error "Cannot build:
unrecognized architecture, see <urcu/arch.h>."
57 | #error "Cannot build: unrecognized architecture, see
<urcu/arch.h>."
| ^~~~~
In file included from ../include/urcu/static/wfcqueue.h:35,
from wfcqueue.c:26:
../include/urcu/uatomic.h:57:2: error: #error "Cannot build:
unrecognized architecture, see <urcu/arch.h>."
57 | #error "Cannot build: unrecognized architecture, see
<urcu/arch.h>."
| ^~~~~
......
```
The Full log can be found at
https://buildd.debian.org/status/logs.php?pkg=liburcu&ver=0.14.0-3.1&arch=loong64.
After ayanlyzing, One upstream patch is missing for LoongArch in the
liburcu 0.14.0-3.1 source package.
The missing code can be found at
https://github.com/urcu/userspace-rcu/blob/5eb8d947c57e092129443aa38efffc9fb6ab6816/include/urcu/uatomic.h#L96.
Please consider the patch I attached.
I have built liburcu 0.14.0-3.1 successfully on my local ENV.
Your opinions are welcome.
Thanks,
Dandan Zhang
Description: Fix the support for loongarch
Last-Update: 2024-06-06
--- liburcu-0.14.0.orig/include/urcu/uatomic.h
+++ liburcu-0.14.0/include/urcu/uatomic.h
@@ -53,6 +53,8 @@
#include <urcu/uatomic/riscv.h>
#elif defined(URCU_ARCH_SUPERH)
#include <urcu/uatomic/superh.h>
+#elif defined(URCU_ARCH_LOONGARCH)
+#include <urcu/uatomic/loongarch.h>
#else
#error "Cannot build: unrecognized architecture, see <urcu/arch.h>."
#endif