[packages/quickjs] fix build on archs without support for 64-bit atomics

atler atler at pld-linux.org
Fri Nov 7 01:02:44 CET 2025


commit 83505c6f90b87b27ae6c7efbac0308d4d7f8a5d5
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Nov 7 00:46:33 2025 +0100

    fix build on archs without support for 64-bit atomics

 atomics.patch | 11 +++++++++++
 quickjs.spec  |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/quickjs.spec b/quickjs.spec
index 6cb2259..a9ec6d9 100644
--- a/quickjs.spec
+++ b/quickjs.spec
@@ -9,6 +9,7 @@ Group:		Libraries
 Source0:	https://bellard.org/quickjs/%{name}-%{ver}-2.tar.xz
 # Source0-md5:	1eefa9b7a1b7925c23627b8c8d8fa349
 Patch0:		rpmpldcflags.patch
+Patch1:		atomics.patch
 URL:		https://bellard.org/quickjs/
 %ifnarch %arch_with_atomics64
 BuildRequires:	libatomic-devel
@@ -47,6 +48,7 @@ Pliki nagłówkowe biblioteki QuickJS.
 %prep
 %setup -q -n %{name}-%{ver}
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %{__make} \
diff --git a/atomics.patch b/atomics.patch
new file mode 100644
index 0000000..7ed6b06
--- /dev/null
+++ b/atomics.patch
@@ -0,0 +1,11 @@
+--- quickjs-2025-09-13/qjsc.c.orig	2025-09-18 10:25:07.000000000 +0200
++++ quickjs-2025-09-13/qjsc.c	2025-11-07 00:40:57.730852539 +0100
+@@ -504,6 +504,8 @@
+     *arg++ = "-lm";
+     *arg++ = "-ldl";
+     *arg++ = "-lpthread";
++    if (!__atomic_always_lock_free(sizeof(uint64_t), 0))
++        *arg++ = "-latomic";
+     *arg = NULL;
+ 
+     if (verbose) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/quickjs.git/commitdiff/a12e4c2ea2b7336c7e5ddef5edb543d4cc6c2151




More information about the pld-cvs-commit mailing list