[packages/firefox] extend libatomic check

atler atler at pld-linux.org
Sat Jan 24 00:26:28 CET 2026


commit 502fb36a31fb9cfc0b59200f71772a8a5e45056c
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Jan 24 00:25:06 2026 +0100

    extend libatomic check
    
    particular combination used by firefox: std::atomic<double> +
    -std=gnu++20 requires libatomic on i686 with clang despite the fact
    64-bit atomics work fine on this target. see:
    
    https://github.com/llvm/llvm-project/issues/177701

 firefox.spec          |  6 ++++++
 libatomic-check.patch | 13 +++++++++++++
 2 files changed, 19 insertions(+)
---
diff --git a/firefox.spec b/firefox.spec
index b1e9afa..0eb3e3d 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -288,6 +288,8 @@ Source202:	https://releases.mozilla.org/pub/firefox/releases/%{version}/linux-x8
 # Source202-md5:	92ea63a0dea2340fb4af788bf996da24
 Patch0:		custom-rust-lto.patch
 Patch1:		system-av1-link.patch
+# https://github.com/llvm/llvm-project/issues/177701
+Patch2:		libatomic-check.patch
 Patch4:		%{name}-prefs.patch
 Patch5:		%{name}-pld-bookmarks.patch
 Patch7:		%{name}-middle_click_paste.patch
@@ -316,6 +318,9 @@ BuildRequires:	gtk+3-devel >= 3.14.0
 %ifnarch %arch_with_atomics64
 BuildRequires:	libatomic-devel
 %endif
+%ifarch %{ix86}
+BuildRequires:	libatomic-devel
+%endif
 BuildRequires:	libdrm-devel
 # DECnet (dnprogs.spec), not dummy net (libdnet.spec)
 #BuildRequires:	libdnet-devel
@@ -2172,6 +2177,7 @@ done
 
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 %patch -P4 -p1
 %patch -P5 -p1
 %patch -P7 -p1
diff --git a/libatomic-check.patch b/libatomic-check.patch
new file mode 100644
index 0000000..7a2f556
--- /dev/null
+++ b/libatomic-check.patch
@@ -0,0 +1,13 @@
+--- firefox-147.0/build/moz.configure/libraries.configure.orig	2026-01-06 01:36:39.000000000 +0100
++++ firefox-147.0/build/moz.configure/libraries.configure	2026-01-23 21:28:44.930382796 +0100
+@@ -124,8 +124,8 @@
+     def check_std_atomic_requirements(flag=None, when=None):
+         return try_link(
+             includes=["cstdint", "atomic"],
+-            body="std::atomic<uint64_t> foo; foo = 1;",
+-            flags=flag or [],
++            body="std::atomic<uint64_t> foo; foo = 1; std::atomic<double> bar; bar = 1;",
++            flags=["-std=gnu++20"] + (flag or []),
+             when=when,
+         )
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/firefox.git/commitdiff/502fb36a31fb9cfc0b59200f71772a8a5e45056c



More information about the pld-cvs-commit mailing list