Bug#1025336: swi-prolog: Please link against -latomic for "riscv64" arch
Source: swi-prolog
Version: 8.4.3+dfsg-2
Severity: wishlist
Tags: ftbfs patch
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: mafm@debian.org, debian-riscv@lists.debian.org
Hi,
The package needs to link against libatomic in this architecture, with the patch
attached or an equivalent.
I built it locally on hardware, it built fine.
(This happened with 8.4.3+dfsg-2, the patch is for 9.0.0).
Thanks and cheers.
--
Manuel A. Fernandez Montecelo <mafm@debian.org>
diff -Nru swi-prolog-9.0.0+dfsg/debian/changelog swi-prolog-9.0.0+dfsg/debian/changelog
--- swi-prolog-9.0.0+dfsg/debian/changelog 2022-12-02 09:49:17.000000000 +0000
+++ swi-prolog-9.0.0+dfsg/debian/changelog 2022-12-02 17:40:49.000000000 +0000
@@ -1,3 +1,10 @@
+swi-prolog (9.0.0+dfsg-1+0.riscv64.1) unreleased; urgency=medium
+
+ * Non-maintainer upload.
+ * riscv64: link against -latomic
+
+ -- Manuel A. Fernandez Montecelo <mafm@debian.org> Fri, 02 Dec 2022 17:40:49 +0000
+
swi-prolog (9.0.0+dfsg-1) unstable; urgency=medium
* New upstream version 9.0.0+dfsg
diff -Nru swi-prolog-9.0.0+dfsg/debian/rules swi-prolog-9.0.0+dfsg/debian/rules
--- swi-prolog-9.0.0+dfsg/debian/rules 2022-12-02 09:49:17.000000000 +0000
+++ swi-prolog-9.0.0+dfsg/debian/rules 2022-12-02 17:40:30.000000000 +0000
@@ -6,6 +6,11 @@
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
+ifeq ($(DEB_BUILD_ARCH),riscv64)
+ DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -Wl,-latomic -Wl,--as-needed
+ export DEB_LDFLAGS_MAINT_APPEND
+endif
+
PLBASENAME := swi-prolog
PLBASE := /usr/lib/$(PLBASENAME)/
JNIDIR := /usr/lib/$(DEB_BUILD_MULTIARCH)/jni
Reply to: