Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b307733eee4b40f39b11e05d95d24386189d7cd6)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b307733eee4b40f39b11e05d95d24386189d7cd6)
  • Date: Tue, 4 Jul 2023 22:48:23 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/DEPENDS
| 2
http/firefox/DETAILS
| 4
http/firefox/HISTORY
| 5
http/firefox/patches/0002-Fortify-sources-properly.patch
| 38 --
http/firefox/patches/0006-bmo-1516803-Fix-building-sandbox.patch
| 28 -

http/firefox/patches/0006-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
| 35 ++

http/firefox/patches/0007-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
| 35 --
http/firefox/patches/0007-musl-Fix-syscall-wrappers.patch
| 42 ++
http/firefox/patches/0008-musl-Fix-syscall-wrappers.patch
| 42 --

http/firefox/patches/0008-musl-Only-use-system-heap-reporter-with-glibc.patch
| 33 ++

http/firefox/patches/0009-musl-Only-use-system-heap-reporter-with-glibc.patch
| 33 --
http/firefox/patches/0009-musl-Set-pthread-name-for-non-glibc-systems.patch
| 29 +
http/firefox/patches/0010-musl-Set-pthread-name-for-non-glibc-systems.patch
| 29 -

http/firefox/patches/0010-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
| 51 +++

http/firefox/patches/0011-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
| 28 +

http/firefox/patches/0011-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
| 51 ---
http/firefox/patches/0012-Make-PGO-use-toolchain.patch
| 33 ++

http/firefox/patches/0012-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
| 28 -
http/firefox/patches/0013-Make-PGO-use-toolchain.patch
| 33 --

http/firefox/patches/0013-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
| 55 +++

http/firefox/patches/0014-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
| 55 ---

http/firefox/patches/0014-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
| 28 +

http/firefox/patches/0015-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
| 32 -
http/firefox/patches/0015-build-Disable-Werror.patch
| 24 +

http/firefox/patches/0016-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 ++

http/firefox/patches/0016-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
| 28 -

http/firefox/patches/0017-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23 +
http/firefox/patches/0017-build-Disable-Werror.patch
| 24 -

http/firefox/patches/0018-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 --
http/firefox/patches/0018-bgo-816975-fix-build-on-x86.patch
| 16

http/firefox/patches/0019-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23 -
http/firefox/patches/0019-bmo-1559213-fix-system-av1-libs.patch
| 23 +
http/firefox/patches/0020-bgo-816975-fix-build-on-x86.patch
| 16
http/firefox/patches/0020-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
http/firefox/patches/0021-bmo-1559213-fix-system-av1-libs.patch
| 23 -
http/firefox/patches/0021-bmo-1754469-memory_mozalloc_throw.patch
| 69 ++++
http/firefox/patches/0022-bgo-860033-firefox-wayland-no-dbus.patch
| 49 ++
http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
http/firefox/patches/0023-bmo-1754469-memory_mozalloc_throw.patch
| 69 ----
http/firefox/patches/0023-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 +++
http/firefox/patches/0024-bgo-860033-firefox-wayland-no-dbus.patch
| 49 --
http/firefox/patches/0024-fix-building-gcc-pgo.patch
| 66 ++++
http/firefox/patches/0025-disable-avx-from-skia.patch
| 22 +
http/firefox/patches/0025-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 ---
http/firefox/patches/0026-fix-building-gcc-pgo.patch
| 50 ---

http/firefox/patches/0027-bgo-908297-ppc64-webrtc-missing-conditions-114.patch
| 35 --
http/firefox/patches/0027-bgo-908297-ppc64-webrtc.patch
| 35 ++
http/firefox/patches/0028-bmo-1835829-non-unified-build-skia-fix.patch
| 24 -
http/firefox/patches/0028-bmo-1840931-elfhack-pgo-fix.patch
| 165 ++++++++++
http/firefox/patches/0029-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0029-disable-avx512-from-skia.patch
| 26 -
http/firefox/patches/0030-enable-vaapi-on-all-amd-cards.patch
| 19 +
http/firefox/patches/0031-bmo-1839023-arm-unified-build-missing-header.patch
| 77 ++++

http/firefox/patches/0032-bmo-1838655-arm-unified-build-missing-include.patch
| 32 +
http/firefox/patches/0033-bgo-907963-rustflags-single-string.patch
| 76 ++++
55 files changed, 1160 insertions(+), 872 deletions(-)

New commits:
commit b307733eee4b40f39b11e05d95d24386189d7cd6
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: version 115.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index cdbc760..0ab1bb3 100755
--- a/http/firefox/DEPENDS
+++ b/http/firefox/DEPENDS
@@ -53,7 +53,7 @@ depends libwebp "--with-system-webp"
&&

depends nspr "--with-system-nspr" &&

-local NSS_BRANCH="3.89" &&
+local NSS_BRANCH="3.90" &&
if spell_ok nss &&
is_version_less "$(installed_version nss)" "${NSS_BRANCH}"; then
depends -sub "${NSS_BRANCH}" nss "--with-system-nss"
diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index 9281984..4af8d0a 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=114.0.2
- SECURITY_PATCH=177
+ VERSION=115.0
+ SECURITY_PATCH=178
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 47c2f31..30a9c22 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2023-07-04 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 115.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.90
+ * patches/*: updated
+
2023-06-22 Pavel Vinogradov <public AT sourcemage.org>
* patches/*: updated

diff --git a/http/firefox/patches/0002-Fortify-sources-properly.patch
b/http/firefox/patches/0002-Fortify-sources-properly.patch
index 3abe8b0..bef79ad 100644
--- a/http/firefox/patches/0002-Fortify-sources-properly.patch
+++ b/http/firefox/patches/0002-Fortify-sources-properly.patch
@@ -1,21 +1,7 @@
-From a1395e97ffdbc9404a343b76fd731dc7ef385ffc Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy AT gentoo.org>
-Date: Mon, 6 Apr 2020 19:16:36 +0200
-Subject: [PATCH 02/30] Fortify sources properly
-
-Ensure we fortify properly, features.h is pulled in via fortification.
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- config/system-headers.mozbuild | 1 -
- third_party/sipcc/sdp_os_defs.h | 3 ---
- 2 files changed, 4 deletions(-)
-
-diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index a1b58eb59b..ae0c9d6d7c 100644
---- a/config/system-headers.mozbuild
-+++ b/config/system-headers.mozbuild
-@@ -229,7 +229,6 @@ system_headers = [
+diff -Naur a/config/system-headers.mozbuild b/config/system-headers.mozbuild
+--- a/config/system-headers.mozbuild 2023-07-04 13:57:53.418421221 +0300
++++ b/config/system-headers.mozbuild 2023-07-04 13:58:41.177179152 +0300
+@@ -227,7 +227,6 @@
'execinfo.h',
'extras.h',
'fcntl.h',
@@ -23,19 +9,3 @@ index a1b58eb59b..ae0c9d6d7c 100644
'fenv.h',
'ffi.h',
'fibdef.h',
-diff --git a/third_party/sipcc/sdp_os_defs.h
b/third_party/sipcc/sdp_os_defs.h
-index 16c9b33329..df38d9336c 100644
---- a/third_party/sipcc/sdp_os_defs.h
-+++ b/third_party/sipcc/sdp_os_defs.h
-@@ -20,8 +20,5 @@
- typedef uint8_t tinybool;
- typedef unsigned short ushort;
- typedef unsigned long ulong;
--#ifndef __GNUC_STDC_INLINE__
--#define inline
--#endif
-
- #endif /* _SDP_OS_DEFS_H_ */
---
-2.34.1
-
diff --git a/http/firefox/patches/0006-bmo-1516803-Fix-building-sandbox.patch
b/http/firefox/patches/0006-bmo-1516803-Fix-building-sandbox.patch
deleted file mode 100644
index 24333b2..0000000
--- a/http/firefox/patches/0006-bmo-1516803-Fix-building-sandbox.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6eeeca1b673a60d3e51427b2a5cf3e916bdb012b Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 6 Apr 2020 19:44:28 +0200
-Subject: [PATCH 09/30] bmo#1516803: Fix building sandbox
-
-Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516803
-Bug: https://bugs.gentoo.org/666580
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/linux/moz.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
-index 573f667812..e62d1a99a4 100644
---- a/security/sandbox/linux/moz.build
-+++ b/security/sandbox/linux/moz.build
-@@ -116,7 +116,7 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"):
- # forcing there to be only one partition.
- for f in CONFIG["OS_CXXFLAGS"]:
- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
-- LDFLAGS += ["--param lto-partitions=1"]
-+ LDFLAGS += ["--param", "lto-partitions=1"]
-
- DEFINES["NS_NO_XPCOM"] = True
- DisableStlWrapping()
---
-2.34.1
-
diff --git
a/http/firefox/patches/0006-musl-Add-alternate-name-for-private-siginfo-struct-m.patch

b/http/firefox/patches/0006-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
new file mode 100644
index 0000000..300846f
--- /dev/null
+++
b/http/firefox/patches/0006-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
@@ -0,0 +1,35 @@
+From d8ec0bd6f3b0ad2dfd8a97a864f08decaafdea69 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel AT sholland.org>
+Date: Sun, 8 Jan 2017 19:16:38 -0600
+Subject: [PATCH 10/30] musl: Add alternate name for private siginfo struct
+ member
+
+musl does not provide a macro for detecting its presence. For now,
+assume that it is the only non-glibc-based libc on Linux systems.
+
+Signed-off-by: Samuel Holland <samuel AT sholland.org>
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
+index 9884be8bb2..86d8f88e30 100644
+--- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
++++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
+@@ -174,7 +174,11 @@ void Trap::SigSys(int nr, LinuxSigInfo* info,
ucontext_t* ctx) {
+ // If the version of glibc doesn't include this information in
+ // siginfo_t (older than 2.17), we need to explicitly copy it
+ // into an arch_sigsys structure.
+- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
++#if defined(__GLIBC__)
++ memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
++#else
++ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys));
++#endif
+ #endif
+
+ #if defined(__mips__)
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0007-musl-Add-alternate-name-for-private-siginfo-struct-m.patch

b/http/firefox/patches/0007-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
deleted file mode 100644
index 300846f..0000000
---
a/http/firefox/patches/0007-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d8ec0bd6f3b0ad2dfd8a97a864f08decaafdea69 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel AT sholland.org>
-Date: Sun, 8 Jan 2017 19:16:38 -0600
-Subject: [PATCH 10/30] musl: Add alternate name for private siginfo struct
- member
-
-musl does not provide a macro for detecting its presence. For now,
-assume that it is the only non-glibc-based libc on Linux systems.
-
-Signed-off-by: Samuel Holland <samuel AT sholland.org>
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
-index 9884be8bb2..86d8f88e30 100644
---- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
-+++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
-@@ -174,7 +174,11 @@ void Trap::SigSys(int nr, LinuxSigInfo* info,
ucontext_t* ctx) {
- // If the version of glibc doesn't include this information in
- // siginfo_t (older than 2.17), we need to explicitly copy it
- // into an arch_sigsys structure.
-- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
-+#if defined(__GLIBC__)
-+ memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
-+#else
-+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys));
-+#endif
- #endif
-
- #if defined(__mips__)
---
-2.34.1
-
diff --git a/http/firefox/patches/0007-musl-Fix-syscall-wrappers.patch
b/http/firefox/patches/0007-musl-Fix-syscall-wrappers.patch
new file mode 100644
index 0000000..d9dda49
--- /dev/null
+++ b/http/firefox/patches/0007-musl-Fix-syscall-wrappers.patch
@@ -0,0 +1,42 @@
+From 1b46c0fc085fe93c36320d7ac1004c83efccdccc Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel AT sholland.org>
+Date: Sun, 8 Jan 2017 19:19:23 -0600
+Subject: [PATCH 11/30] musl: Fix syscall wrappers
+
+musl defines p{read,write}64 to their non-suffixed equivalents to avoid
+duplication in its syscall wrappers. This breaks macro expansion here,
+leading to errors such as:
+
+In function size_t sys_pread64(int, void*, size_t, off_t):
+ error: '__NR_pread' was not declared in this scope
+
+The fix here is to undefine the p{read,write}64 macros, so the syscall
+expands to (e.g.) __NR_pread64 instead.
+
+Signed-off-by: Samuel Holland <samuel AT sholland.org>
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ .../src/third_party/lss/linux_syscall_support.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git
a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h

b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+index 1abe0ba5b0..d6087a1674 100644
+---
a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
++++
b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+@@ -173,6 +173,13 @@ extern "C" {
+ # undef __NR_waitpid
+ #endif
+
++#ifdef pread64
++#undef pread64
++#endif
++#ifdef pwrite64
++#undef pwrite64
++#endif
++
+ /* As glibc often provides subtly incompatible data structures (and implicit
+ * wrapper functions that convert them), we provide our own kernel data
+ * structures for use by the system calls.
+--
+2.34.1
+
diff --git a/http/firefox/patches/0008-musl-Fix-syscall-wrappers.patch
b/http/firefox/patches/0008-musl-Fix-syscall-wrappers.patch
deleted file mode 100644
index d9dda49..0000000
--- a/http/firefox/patches/0008-musl-Fix-syscall-wrappers.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1b46c0fc085fe93c36320d7ac1004c83efccdccc Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel AT sholland.org>
-Date: Sun, 8 Jan 2017 19:19:23 -0600
-Subject: [PATCH 11/30] musl: Fix syscall wrappers
-
-musl defines p{read,write}64 to their non-suffixed equivalents to avoid
-duplication in its syscall wrappers. This breaks macro expansion here,
-leading to errors such as:
-
-In function size_t sys_pread64(int, void*, size_t, off_t):
- error: '__NR_pread' was not declared in this scope
-
-The fix here is to undefine the p{read,write}64 macros, so the syscall
-expands to (e.g.) __NR_pread64 instead.
-
-Signed-off-by: Samuel Holland <samuel AT sholland.org>
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- .../src/third_party/lss/linux_syscall_support.h | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git
a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h

b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
-index 1abe0ba5b0..d6087a1674 100644
----
a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
-+++
b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
-@@ -173,6 +173,13 @@ extern "C" {
- # undef __NR_waitpid
- #endif
-
-+#ifdef pread64
-+#undef pread64
-+#endif
-+#ifdef pwrite64
-+#undef pwrite64
-+#endif
-+
- /* As glibc often provides subtly incompatible data structures (and implicit
- * wrapper functions that convert them), we provide our own kernel data
- * structures for use by the system calls.
---
-2.34.1
-
diff --git
a/http/firefox/patches/0008-musl-Only-use-system-heap-reporter-with-glibc.patch

b/http/firefox/patches/0008-musl-Only-use-system-heap-reporter-with-glibc.patch
new file mode 100644
index 0000000..08f0214
--- /dev/null
+++
b/http/firefox/patches/0008-musl-Only-use-system-heap-reporter-with-glibc.patch
@@ -0,0 +1,33 @@
+From 68dd87a3dc06cf59396dccc3e031761f7237656e Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:09:26 +0200
+Subject: [PATCH 12/30] musl: Only use system heap reporter with glibc
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ xpcom/base/nsMemoryReporterManager.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xpcom/base/nsMemoryReporterManager.cpp
b/xpcom/base/nsMemoryReporterManager.cpp
+index bd4629c785..b513f81216 100644
+--- a/xpcom/base/nsMemoryReporterManager.cpp
++++ b/xpcom/base/nsMemoryReporterManager.cpp
+@@ -647,6 +647,7 @@ static bool InSharedRegion(mach_vm_address_t aAddr,
cpu_type_t aType) {
+ return NS_OK;
+ }
+
++#ifdef __GLIBC__
+ # define HAVE_SYSTEM_HEAP_REPORTER 1
+ // Windows can have multiple separate heaps, but we should not touch
non-default
+ // heaps because they may be destroyed at anytime while we hold a handle.
So we
+@@ -679,6 +680,7 @@ static bool InSharedRegion(mach_vm_address_t aAddr,
cpu_type_t aType) {
+ *aSizeOut = heapSize;
+ return NS_OK;
+ }
++#endif
+
+ struct SegmentKind {
+ DWORD mState;
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0009-musl-Only-use-system-heap-reporter-with-glibc.patch

b/http/firefox/patches/0009-musl-Only-use-system-heap-reporter-with-glibc.patch
deleted file mode 100644
index 08f0214..0000000
---
a/http/firefox/patches/0009-musl-Only-use-system-heap-reporter-with-glibc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 68dd87a3dc06cf59396dccc3e031761f7237656e Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:09:26 +0200
-Subject: [PATCH 12/30] musl: Only use system heap reporter with glibc
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- xpcom/base/nsMemoryReporterManager.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/xpcom/base/nsMemoryReporterManager.cpp
b/xpcom/base/nsMemoryReporterManager.cpp
-index bd4629c785..b513f81216 100644
---- a/xpcom/base/nsMemoryReporterManager.cpp
-+++ b/xpcom/base/nsMemoryReporterManager.cpp
-@@ -647,6 +647,7 @@ static bool InSharedRegion(mach_vm_address_t aAddr,
cpu_type_t aType) {
- return NS_OK;
- }
-
-+#ifdef __GLIBC__
- # define HAVE_SYSTEM_HEAP_REPORTER 1
- // Windows can have multiple separate heaps, but we should not touch
non-default
- // heaps because they may be destroyed at anytime while we hold a handle.
So we
-@@ -679,6 +680,7 @@ static bool InSharedRegion(mach_vm_address_t aAddr,
cpu_type_t aType) {
- *aSizeOut = heapSize;
- return NS_OK;
- }
-+#endif
-
- struct SegmentKind {
- DWORD mState;
---
-2.34.1
-
diff --git
a/http/firefox/patches/0009-musl-Set-pthread-name-for-non-glibc-systems.patch
b/http/firefox/patches/0009-musl-Set-pthread-name-for-non-glibc-systems.patch
new file mode 100644
index 0000000..fe74bb1
--- /dev/null
+++
b/http/firefox/patches/0009-musl-Set-pthread-name-for-non-glibc-systems.patch
@@ -0,0 +1,29 @@
+From 70d47d18420fe9e3de8f896c08f97ef2596c9c84 Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:10:03 +0200
+Subject: [PATCH 13/30] musl: Set pthread name for non glibc systems
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ js/src/threading/posix/PosixThread.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/js/src/threading/posix/PosixThread.cpp
b/js/src/threading/posix/PosixThread.cpp
+index 35532e375b..983da45326 100644
+--- a/js/src/threading/posix/PosixThread.cpp
++++ b/js/src/threading/posix/PosixThread.cpp
+@@ -115,8 +115,10 @@ void ThisThread::SetName(const char* name) {
+ rv = 0;
+ #elif defined(__NetBSD__)
+ rv = pthread_setname_np(pthread_self(), "%s", (void*)name);
+-#else
++#elif defined(__GLIBC__)
+ rv = pthread_setname_np(pthread_self(), name);
++#else
++ rv = 0;
+ #endif
+ MOZ_RELEASE_ASSERT(!rv);
+ }
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0010-musl-Set-pthread-name-for-non-glibc-systems.patch
b/http/firefox/patches/0010-musl-Set-pthread-name-for-non-glibc-systems.patch
deleted file mode 100644
index fe74bb1..0000000
---
a/http/firefox/patches/0010-musl-Set-pthread-name-for-non-glibc-systems.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 70d47d18420fe9e3de8f896c08f97ef2596c9c84 Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:10:03 +0200
-Subject: [PATCH 13/30] musl: Set pthread name for non glibc systems
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- js/src/threading/posix/PosixThread.cpp | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/js/src/threading/posix/PosixThread.cpp
b/js/src/threading/posix/PosixThread.cpp
-index 35532e375b..983da45326 100644
---- a/js/src/threading/posix/PosixThread.cpp
-+++ b/js/src/threading/posix/PosixThread.cpp
-@@ -115,8 +115,10 @@ void ThisThread::SetName(const char* name) {
- rv = 0;
- #elif defined(__NetBSD__)
- rv = pthread_setname_np(pthread_self(), "%s", (void*)name);
--#else
-+#elif defined(__GLIBC__)
- rv = pthread_setname_np(pthread_self(), name);
-+#else
-+ rv = 0;
- #endif
- MOZ_RELEASE_ASSERT(!rv);
- }
---
-2.34.1
-
diff --git
a/http/firefox/patches/0010-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch

b/http/firefox/patches/0010-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
new file mode 100644
index 0000000..121c8cd
--- /dev/null
+++
b/http/firefox/patches/0010-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
@@ -0,0 +1,51 @@
+From beed745f96bbc18a3c22a728095c9a2eef7435ee Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:12:09 +0200
+Subject: [PATCH 15/30] musl: sys/auvx.h avaliable on more then just glibc
+ systems
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ .../system_wrappers/source/cpu_features_linux.cc | 12 +++---------
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+diff --git
a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+index 335bed4da3..c2c98dae8a 100644
+--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
++++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -12,13 +12,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#ifdef __GLIBC_PREREQ
+-#define WEBRTC_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
+-#else
+-#define WEBRTC_GLIBC_PREREQ(a, b) 0
+-#endif
+-
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if defined(__linux__)
+ #include <sys/auxv.h>
+ #else
+ #include <errno.h>
+@@ -40,7 +34,7 @@ uint64_t GetCPUFeaturesARM(void) {
+ int architecture = 0;
+ uint64_t hwcap = 0;
+ const char* platform = NULL;
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if defined(__linux__)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
+@@ -64,7 +58,7 @@ uint64_t GetCPUFeaturesARM(void) {
+ }
+ close(fd);
+ }
+-#endif // WEBRTC_GLIBC_PREREQ(2, 16)
++#endif // (__linux__)
+ #if defined(__aarch64__)
+ architecture = 8;
+ if ((hwcap & HWCAP_FP) != 0)
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0011-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

b/http/firefox/patches/0011-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
new file mode 100644
index 0000000..9de0db7
--- /dev/null
+++
b/http/firefox/patches/0011-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
@@ -0,0 +1,28 @@
+From 6d36ed9e971861321bb381e25516500069314eb6 Mon Sep 17 00:00:00 2001
+From: Johannes <johannes.brechtmann AT gmail.com>
+Date: Fri, 1 May 2020 17:20:29 +0200
+Subject: [PATCH 16/30] musl: make SYS_fork non-fatal, musl uses it for
fork(2)
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ security/sandbox/linux/SandboxFilter.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
+index eb72d944c8..8ce22d6f65 100644
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1537,6 +1537,10 @@ class ContentSandboxPolicy : public
SandboxPolicyCommon {
+ // usually do something reasonable on error.
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++# ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++# endif
+
+ case __NR_clone3:
+ return Error(ENOSYS);
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0011-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch

b/http/firefox/patches/0011-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
deleted file mode 100644
index 121c8cd..0000000
---
a/http/firefox/patches/0011-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From beed745f96bbc18a3c22a728095c9a2eef7435ee Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:12:09 +0200
-Subject: [PATCH 15/30] musl: sys/auvx.h avaliable on more then just glibc
- systems
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- .../system_wrappers/source/cpu_features_linux.cc | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git
a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
-index 335bed4da3..c2c98dae8a 100644
---- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
-+++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
-@@ -12,13 +12,7 @@
- #include <stdlib.h>
- #include <string.h>
-
--#ifdef __GLIBC_PREREQ
--#define WEBRTC_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
--#else
--#define WEBRTC_GLIBC_PREREQ(a, b) 0
--#endif
--
--#if WEBRTC_GLIBC_PREREQ(2, 16)
-+#if defined(__linux__)
- #include <sys/auxv.h>
- #else
- #include <errno.h>
-@@ -40,7 +34,7 @@ uint64_t GetCPUFeaturesARM(void) {
- int architecture = 0;
- uint64_t hwcap = 0;
- const char* platform = NULL;
--#if WEBRTC_GLIBC_PREREQ(2, 16)
-+#if defined(__linux__)
- hwcap = getauxval(AT_HWCAP);
- platform = (const char*)getauxval(AT_PLATFORM);
- #else
-@@ -64,7 +58,7 @@ uint64_t GetCPUFeaturesARM(void) {
- }
- close(fd);
- }
--#endif // WEBRTC_GLIBC_PREREQ(2, 16)
-+#endif // (__linux__)
- #if defined(__aarch64__)
- architecture = 8;
- if ((hwcap & HWCAP_FP) != 0)
---
-2.34.1
-
diff --git a/http/firefox/patches/0012-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0012-Make-PGO-use-toolchain.patch
new file mode 100644
index 0000000..3f72b05
--- /dev/null
+++ b/http/firefox/patches/0012-Make-PGO-use-toolchain.patch
@@ -0,0 +1,33 @@
+From 45d43bb2dc1c1c033c860951c93261e98647f851 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:13:34 +0200
+Subject: [PATCH 18/30] Make PGO use toolchain
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ build/unix/mozconfig.unix | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
+index 9ca9c97fce..9f86fe0940 100644
+--- a/build/unix/mozconfig.unix
++++ b/build/unix/mozconfig.unix
+@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
+ CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
+ CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
+
++ if [ -n "$MOZ_PGO" ]; then
++ if [ -z "$USE_ARTIFACT" ]; then
++ ac_add_options --enable-lto
++ fi
++ export AR="$topsrcdir/gcc/bin/gcc-ar"
++ export NM="$topsrcdir/gcc/bin/gcc-nm"
++ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
++ fi
++
+ # We want to make sure we use binutils and other binaries in the
tooltool
+ # package.
+ mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0012-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

b/http/firefox/patches/0012-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
deleted file mode 100644
index 9de0db7..0000000
---
a/http/firefox/patches/0012-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6d36ed9e971861321bb381e25516500069314eb6 Mon Sep 17 00:00:00 2001
-From: Johannes <johannes.brechtmann AT gmail.com>
-Date: Fri, 1 May 2020 17:20:29 +0200
-Subject: [PATCH 16/30] musl: make SYS_fork non-fatal, musl uses it for
fork(2)
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/linux/SandboxFilter.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
-index eb72d944c8..8ce22d6f65 100644
---- a/security/sandbox/linux/SandboxFilter.cpp
-+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -1537,6 +1537,10 @@ class ContentSandboxPolicy : public
SandboxPolicyCommon {
- // usually do something reasonable on error.
- case __NR_clone:
- return ClonePolicy(Error(EPERM));
-+# ifdef __NR_fork
-+ case __NR_fork:
-+ return Error(ENOSYS);
-+# endif
-
- case __NR_clone3:
- return Error(ENOSYS);
---
-2.34.1
-
diff --git a/http/firefox/patches/0013-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0013-Make-PGO-use-toolchain.patch
deleted file mode 100644
index 3f72b05..0000000
--- a/http/firefox/patches/0013-Make-PGO-use-toolchain.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 45d43bb2dc1c1c033c860951c93261e98647f851 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:13:34 +0200
-Subject: [PATCH 18/30] Make PGO use toolchain
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/unix/mozconfig.unix | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
-index 9ca9c97fce..9f86fe0940 100644
---- a/build/unix/mozconfig.unix
-+++ b/build/unix/mozconfig.unix
-@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
- CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
- CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
-
-+ if [ -n "$MOZ_PGO" ]; then
-+ if [ -z "$USE_ARTIFACT" ]; then
-+ ac_add_options --enable-lto
-+ fi
-+ export AR="$topsrcdir/gcc/bin/gcc-ar"
-+ export NM="$topsrcdir/gcc/bin/gcc-nm"
-+ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
-+ fi
-+
- # We want to make sure we use binutils and other binaries in the
tooltool
- # package.
- mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
---
-2.34.1
-
diff --git
a/http/firefox/patches/0013-bmo-1516081-Disable-watchdog-during-PGO-builds.patch

b/http/firefox/patches/0013-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
new file mode 100644
index 0000000..70cf5c3
--- /dev/null
+++
b/http/firefox/patches/0013-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
@@ -0,0 +1,55 @@
+From 2502829abc1a02a08cc1934538c3d30e6f4f6fae Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:27:06 +0200
+Subject: [PATCH 19/30] bmo#1516081: Disable watchdog during PGO builds
+
+Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516081
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ build/moz.configure/lto-pgo.configure | 4 ++--
+ toolkit/components/terminator/nsTerminator.cpp | 7 +++++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
+index e5a4e6f913..567ccf0ba4 100644
+--- a/build/moz.configure/lto-pgo.configure
++++ b/build/moz.configure/lto-pgo.configure
+@@ -84,7 +84,7 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
+ def pgo_flags(compiler, profdata, target_is_windows):
+ if compiler.type == "gcc":
+ return namespace(
+- gen_cflags=["-fprofile-generate"],
++ gen_cflags=["-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"],
+ gen_ldflags=["-fprofile-generate"],
+ use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
+ use_ldflags=["-fprofile-use"],
+@@ -98,7 +98,7 @@ def pgo_flags(compiler, profdata, target_is_windows):
+ else:
+ gen_ldflags = ["-fprofile-generate"]
+
+- gen_cflags = [prefix + "-fprofile-generate"]
++ gen_cflags = [prefix + "-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"]
+ if target_is_windows:
+ # native llvm-profdata.exe on Windows can't read profile data
+ # if name compression is enabled (which cross-compiling enables
+diff --git a/toolkit/components/terminator/nsTerminator.cpp
b/toolkit/components/terminator/nsTerminator.cpp
+index 194bb36e2d..c960d44137 100644
+--- a/toolkit/components/terminator/nsTerminator.cpp
++++ b/toolkit/components/terminator/nsTerminator.cpp
+@@ -466,6 +466,13 @@ void nsTerminator::StartWatchdog() {
+ }
+ #endif
+
++ // Disable watchdog for PGO train builds - writting profile information at
++ // exit may take time and it is better to make build hang rather than
++ // silently produce poorly performing binary.
++#ifdef MOZ_PROFILE_INSTRUMENTATION
++ crashAfterMS = INT32_MAX;
++#endif
++
+ UniquePtr<Options> options(new Options());
+ const PRIntervalTime ticksDuration =
+ PR_MillisecondsToInterval(HEARTBEAT_INTERVAL_MS);
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0014-bmo-1516081-Disable-watchdog-during-PGO-builds.patch

b/http/firefox/patches/0014-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
deleted file mode 100644
index 70cf5c3..0000000
---
a/http/firefox/patches/0014-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 2502829abc1a02a08cc1934538c3d30e6f4f6fae Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:27:06 +0200
-Subject: [PATCH 19/30] bmo#1516081: Disable watchdog during PGO builds
-
-Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516081
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/moz.configure/lto-pgo.configure | 4 ++--
- toolkit/components/terminator/nsTerminator.cpp | 7 +++++++
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
-index e5a4e6f913..567ccf0ba4 100644
---- a/build/moz.configure/lto-pgo.configure
-+++ b/build/moz.configure/lto-pgo.configure
-@@ -84,7 +84,7 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
- def pgo_flags(compiler, profdata, target_is_windows):
- if compiler.type == "gcc":
- return namespace(
-- gen_cflags=["-fprofile-generate"],
-+ gen_cflags=["-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"],
- gen_ldflags=["-fprofile-generate"],
- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
- use_ldflags=["-fprofile-use"],
-@@ -98,7 +98,7 @@ def pgo_flags(compiler, profdata, target_is_windows):
- else:
- gen_ldflags = ["-fprofile-generate"]
-
-- gen_cflags = [prefix + "-fprofile-generate"]
-+ gen_cflags = [prefix + "-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"]
- if target_is_windows:
- # native llvm-profdata.exe on Windows can't read profile data
- # if name compression is enabled (which cross-compiling enables
-diff --git a/toolkit/components/terminator/nsTerminator.cpp
b/toolkit/components/terminator/nsTerminator.cpp
-index 194bb36e2d..c960d44137 100644
---- a/toolkit/components/terminator/nsTerminator.cpp
-+++ b/toolkit/components/terminator/nsTerminator.cpp
-@@ -466,6 +466,13 @@ void nsTerminator::StartWatchdog() {
- }
- #endif
-
-+ // Disable watchdog for PGO train builds - writting profile information at
-+ // exit may take time and it is better to make build hang rather than
-+ // silently produce poorly performing binary.
-+#ifdef MOZ_PROFILE_INSTRUMENTATION
-+ crashAfterMS = INT32_MAX;
-+#endif
-+
- UniquePtr<Options> options(new Options());
- const PRIntervalTime ticksDuration =
- PR_MillisecondsToInterval(HEARTBEAT_INTERVAL_MS);
---
-2.34.1
-
diff --git
a/http/firefox/patches/0014-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0014-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
new file mode 100644
index 0000000..85c305f
--- /dev/null
+++
b/http/firefox/patches/0014-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
@@ -0,0 +1,28 @@
+From 6e220b49aee7dbdcafd255f6260517c5c551f9b1 Mon Sep 17 00:00:00 2001
+From: Mike Hommey <mh AT glandium.org>
+Date: Mon, 26 Nov 2018 09:59:56 +0900
+Subject: [PATCH 23/30] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
+ libaom neon code
+
+Bug: https://bugs.gentoo.org/730606
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ media/libaom/moz.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index fd8c7f2b33..db3f9ca6ec 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0015-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch

b/http/firefox/patches/0015-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
deleted file mode 100644
index ef8f9b2..0000000
---
a/http/firefox/patches/0015-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 0501ed4bbdbf8d16a69a4460d2ada33ac259365d Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Wed, 15 Apr 2020 00:27:25 +0200
-Subject: [PATCH 20/30] bmo#1516803: force one LTO partition for sandbox when
- using GCC
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/linux/moz.build | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
-index e62d1a99a4..913b9ba2ce 100644
---- a/security/sandbox/linux/moz.build
-+++ b/security/sandbox/linux/moz.build
-@@ -114,9 +114,10 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"):
- # gcc lto likes to put the top level asm in syscall.cc in a different
partition
- # from the function using it which breaks the build. Work around that by
- # forcing there to be only one partition.
--for f in CONFIG["OS_CXXFLAGS"]:
-- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
-- LDFLAGS += ["--param", "lto-partitions=1"]
-+if CONFIG["CC_TYPE"] != "clang" and CONFIG["MOZ_LTO_LDFLAGS"] is not None:
-+ for f in CONFIG["MOZ_LTO_LDFLAGS"]:
-+ if f.startswith("-flto"):
-+ LDFLAGS += ["--param", "lto-partitions=1"]
-
- DEFINES["NS_NO_XPCOM"] = True
- DisableStlWrapping()
---
-2.34.1
-
diff --git a/http/firefox/patches/0015-build-Disable-Werror.patch
b/http/firefox/patches/0015-build-Disable-Werror.patch
new file mode 100644
index 0000000..e1df117
--- /dev/null
+++ b/http/firefox/patches/0015-build-Disable-Werror.patch
@@ -0,0 +1,24 @@
+diff -Naur a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
+--- a/build/moz.configure/warnings.configure 2022-10-10 19:05:25.000000000
+0300
++++ b/build/moz.configure/warnings.configure 2022-10-18 13:59:24.514026407
+0300
+@@ -160,6 +160,9 @@
+ # false positives depending on optimization
+ check_and_add_warning("-Wno-error=array-bounds")
+
++# can't get rid of those PGO warnings
++check_and_add_warning("-Wno-error=coverage-mismatch")
++
+ # false positives depending on optimizations
+ check_and_add_warning("-Wno-error=free-nonheap-object")
+
+@@ -279,8 +282,8 @@
+ # build, but we're not sure why.
+ check_and_add_warning("-Wno-enum-compare")
+
+-# Make it an error to be missing function declarations for C code.
+-check_and_add_warning("-Werror=implicit-function-declaration", c_compiler)
++check_and_add_warning("-Werror=implicit-function-declaration",
++ when="--enable-warnings-as-errors")
+
+ # New in clang 11. We can't really do anything about this warning.
+ check_and_add_warning("-Wno-psabi")
diff --git
a/http/firefox/patches/0016-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0016-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..32bd0eb
--- /dev/null
+++
b/http/firefox/patches/0016-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
@@ -0,0 +1,34 @@
+From 685e82ac82921720c6cd9c6c45703ff034f081e7 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Sat, 29 Aug 2020 22:30:59 +0200
+Subject: [PATCH 25/30] LTO: Only enable LTO for Rust when complete build uses
+ LTO
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ config/makefiles/rust.mk | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+index 75570d32b9..924722a506 100644
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -87,6 +87,7 @@ endif
+ # These flags are passed via `cargo rustc` and only apply to the final rustc
+ # invocation (i.e., only the top-level crate, not its dependencies).
+ cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
++ifdef MOZ_LTO
+ ifndef DEVELOPER_OPTIONS
+ ifndef MOZ_DEBUG_RUST
+ # Enable link-time optimization for release builds, but not when linking
+@@ -106,6 +107,7 @@ endif
+ endif
+ endif
+ endif
++endif
+
+ ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0016-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0016-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
deleted file mode 100644
index 85c305f..0000000
---
a/http/firefox/patches/0016-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6e220b49aee7dbdcafd255f6260517c5c551f9b1 Mon Sep 17 00:00:00 2001
-From: Mike Hommey <mh AT glandium.org>
-Date: Mon, 26 Nov 2018 09:59:56 +0900
-Subject: [PATCH 23/30] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
- libaom neon code
-
-Bug: https://bugs.gentoo.org/730606
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- media/libaom/moz.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/media/libaom/moz.build b/media/libaom/moz.build
-index fd8c7f2b33..db3f9ca6ec 100644
---- a/media/libaom/moz.build
-+++ b/media/libaom/moz.build
-@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
-
- for f in SOURCES:
- if f.endswith('neon.c'):
-- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
-+ SOURCES[f].flags += CONFIG['NEON_FLAGS']
-
- if CONFIG['OS_TARGET'] == 'Android':
- # For cpu-features.h
---
-2.34.1
-
diff --git
a/http/firefox/patches/0017-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0017-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 0000000..5e48dd2
--- /dev/null
+++
b/http/firefox/patches/0017-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
@@ -0,0 +1,23 @@
+Enable FLAC on platforms without ffvpx like powerpc*
+
+--- a/dom/media/flac/FlacDecoder.cpp
++++ b/dom/media/flac/FlacDecoder.cpp
+@@ -7,6 +7,7 @@
+ #include "FlacDecoder.h"
+ #include "MediaContainerType.h"
+ #include "mozilla/StaticPrefs_media.h"
++#include "PDMFactory.h"
+
+ namespace mozilla {
+
+@@ -14,6 +15,10 @@ namespace mozilla {
+ bool FlacDecoder::IsEnabled() {
+ #ifdef MOZ_FFVPX
+ return StaticPrefs::media_flac_enabled();
++#elif defined(MOZ_FFMPEG)
++ RefPtr<PDMFactory> platform = new PDMFactory();
++ return StaticPrefs::media_flac_enabled() &&
++ (platform->SupportsMimeType("audio/flac"_ns) !=
media::DecodeSupport::Unsupported);
+ #else
+ return false;
+ #endif
diff --git a/http/firefox/patches/0017-build-Disable-Werror.patch
b/http/firefox/patches/0017-build-Disable-Werror.patch
deleted file mode 100644
index e1df117..0000000
--- a/http/firefox/patches/0017-build-Disable-Werror.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naur a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
---- a/build/moz.configure/warnings.configure 2022-10-10 19:05:25.000000000
+0300
-+++ b/build/moz.configure/warnings.configure 2022-10-18 13:59:24.514026407
+0300
-@@ -160,6 +160,9 @@
- # false positives depending on optimization
- check_and_add_warning("-Wno-error=array-bounds")
-
-+# can't get rid of those PGO warnings
-+check_and_add_warning("-Wno-error=coverage-mismatch")
-+
- # false positives depending on optimizations
- check_and_add_warning("-Wno-error=free-nonheap-object")
-
-@@ -279,8 +282,8 @@
- # build, but we're not sure why.
- check_and_add_warning("-Wno-enum-compare")
-
--# Make it an error to be missing function declarations for C code.
--check_and_add_warning("-Werror=implicit-function-declaration", c_compiler)
-+check_and_add_warning("-Werror=implicit-function-declaration",
-+ when="--enable-warnings-as-errors")
-
- # New in clang 11. We can't really do anything about this warning.
- check_and_add_warning("-Wno-psabi")
diff --git
a/http/firefox/patches/0018-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0018-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
deleted file mode 100644
index 32bd0eb..0000000
---
a/http/firefox/patches/0018-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 685e82ac82921720c6cd9c6c45703ff034f081e7 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Sat, 29 Aug 2020 22:30:59 +0200
-Subject: [PATCH 25/30] LTO: Only enable LTO for Rust when complete build uses
- LTO
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- config/makefiles/rust.mk | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
-index 75570d32b9..924722a506 100644
---- a/config/makefiles/rust.mk
-+++ b/config/makefiles/rust.mk
-@@ -87,6 +87,7 @@ endif
- # These flags are passed via `cargo rustc` and only apply to the final rustc
- # invocation (i.e., only the top-level crate, not its dependencies).
- cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
-+ifdef MOZ_LTO
- ifndef DEVELOPER_OPTIONS
- ifndef MOZ_DEBUG_RUST
- # Enable link-time optimization for release builds, but not when linking
-@@ -106,6 +107,7 @@ endif
- endif
- endif
- endif
-+endif
-
- ifdef CARGO_INCREMENTAL
- export CARGO_INCREMENTAL
---
-2.34.1
-
diff --git a/http/firefox/patches/0018-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0018-bgo-816975-fix-build-on-x86.patch
new file mode 100644
index 0000000..4b2289f
--- /dev/null
+++ b/http/firefox/patches/0018-bgo-816975-fix-build-on-x86.patch
@@ -0,0 +1,16 @@
+diff --git a/modules/fdlibm/src/math_private.h
b/modules/fdlibm/src/math_private.h
+index 51d79f9c2ec59..fafd7d6fc1e0d 100644
+--- a/modules/fdlibm/src/math_private.h
++++ b/modules/fdlibm/src/math_private.h
+@@ -30,7 +30,11 @@
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
++#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
++typedef long double __double_t;
++#else
+ typedef double __double_t;
++#endif
+ typedef __double_t double_t;
+
+ /*
diff --git
a/http/firefox/patches/0019-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0019-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
deleted file mode 100644
index 5e48dd2..0000000
---
a/http/firefox/patches/0019-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Enable FLAC on platforms without ffvpx like powerpc*
-
---- a/dom/media/flac/FlacDecoder.cpp
-+++ b/dom/media/flac/FlacDecoder.cpp
-@@ -7,6 +7,7 @@
- #include "FlacDecoder.h"
- #include "MediaContainerType.h"
- #include "mozilla/StaticPrefs_media.h"
-+#include "PDMFactory.h"
-
- namespace mozilla {
-
-@@ -14,6 +15,10 @@ namespace mozilla {
- bool FlacDecoder::IsEnabled() {
- #ifdef MOZ_FFVPX
- return StaticPrefs::media_flac_enabled();
-+#elif defined(MOZ_FFMPEG)
-+ RefPtr<PDMFactory> platform = new PDMFactory();
-+ return StaticPrefs::media_flac_enabled() &&
-+ (platform->SupportsMimeType("audio/flac"_ns) !=
media::DecodeSupport::Unsupported);
- #else
- return false;
- #endif
diff --git a/http/firefox/patches/0019-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0019-bmo-1559213-fix-system-av1-libs.patch
new file mode 100644
index 0000000..361c0b6
--- /dev/null
+++ b/http/firefox/patches/0019-bmo-1559213-fix-system-av1-libs.patch
@@ -0,0 +1,23 @@
+diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+index 0069865..e806fc8 100644
+--- a/media/ffvpx/libavcodec/moz.build
++++ b/media/ffvpx/libavcodec/moz.build
+@@ -108,10 +108,14 @@
+ 'vp9prob.c',
+ 'vp9recon.c'
+ ]
+- USE_LIBS += [
+- 'dav1d',
+- 'media_libdav1d_asm',
+- ]
++ if CONFIG["MOZ_SYSTEM_AV1"]:
++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
++ else:
++ USE_LIBS += [
++ 'dav1d',
++ 'media_libdav1d_asm',
++ ]
+ if CONFIG['MOZ_WAYLAND']:
+ LOCAL_INCLUDES += ['/media/mozva']
+ SOURCES += [
diff --git a/http/firefox/patches/0020-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0020-bgo-816975-fix-build-on-x86.patch
deleted file mode 100644
index 4b2289f..0000000
--- a/http/firefox/patches/0020-bgo-816975-fix-build-on-x86.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/modules/fdlibm/src/math_private.h
b/modules/fdlibm/src/math_private.h
-index 51d79f9c2ec59..fafd7d6fc1e0d 100644
---- a/modules/fdlibm/src/math_private.h
-+++ b/modules/fdlibm/src/math_private.h
-@@ -30,7 +30,11 @@
- * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
- */
-
-+#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
-+typedef long double __double_t;
-+#else
- typedef double __double_t;
-+#endif
- typedef __double_t double_t;
-
- /*
diff --git
a/http/firefox/patches/0020-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0020-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..864741e
--- /dev/null
+++ b/http/firefox/patches/0020-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
@@ -0,0 +1,13 @@
+diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777
firefox-100.0/widget/gtk/nsWindow.cpp
+--- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02
11:29:06.763325015 +0200
++++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334
+0200
+@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR
+ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK |
GDK_SCROLL_MASK |
+- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK;
++ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK |
++ GDK_FOCUS_CHANGE_MASK;
+
+ /* utility functions */
+ static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX,
diff --git a/http/firefox/patches/0021-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0021-bmo-1559213-fix-system-av1-libs.patch
deleted file mode 100644
index 361c0b6..0000000
--- a/http/firefox/patches/0021-bmo-1559213-fix-system-av1-libs.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
-index 0069865..e806fc8 100644
---- a/media/ffvpx/libavcodec/moz.build
-+++ b/media/ffvpx/libavcodec/moz.build
-@@ -108,10 +108,14 @@
- 'vp9prob.c',
- 'vp9recon.c'
- ]
-- USE_LIBS += [
-- 'dav1d',
-- 'media_libdav1d_asm',
-- ]
-+ if CONFIG["MOZ_SYSTEM_AV1"]:
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-+ else:
-+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
-+ ]
- if CONFIG['MOZ_WAYLAND']:
- LOCAL_INCLUDES += ['/media/mozva']
- SOURCES += [
diff --git
a/http/firefox/patches/0021-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0021-bmo-1754469-memory_mozalloc_throw.patch
new file mode 100644
index 0000000..634892be
--- /dev/null
+++ b/http/firefox/patches/0021-bmo-1754469-memory_mozalloc_throw.patch
@@ -0,0 +1,69 @@
+--- a/memory/mozalloc/throw_gcc.h 2022-02-02 17:33:38 UTC
++++ b/memory/mozalloc/throw_gcc.h
+@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
+ mozalloc_abort("fatal: STL threw bad_function_call");
+ }
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_logic_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_domain_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
+ __throw_invalid_argument(const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_length_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_out_of_range(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_runtime_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_range_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
+ __throw_overflow_error(const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
+ __throw_underflow_error(const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_ios_failure(
+ const char* msg) {
diff --git
a/http/firefox/patches/0022-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0022-bgo-860033-firefox-wayland-no-dbus.patch
new file mode 100644
index 0000000..7cf532a
--- /dev/null
+++ b/http/firefox/patches/0022-bgo-860033-firefox-wayland-no-dbus.patch
@@ -0,0 +1,49 @@
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -2353,18 +2353,6 @@ with only_when(compile_environment & tar
+ )
+ set_config("MOZ_D3DCOMPILER_VISTA_DLL_PATH", d3d_compiler_dll.path)
+
+-# Remoting protocol support
+-# ==============================================================
+-
+-
+-@depends(toolkit)
+-def has_remote(toolkit):
+- if toolkit in ("gtk", "windows", "cocoa"):
+- return True
+-
+-
+-set_config("MOZ_HAS_REMOTE", has_remote)
+-set_define("MOZ_HAS_REMOTE", has_remote)
+
+ # RLBox Library Sandboxing wasm support
+ # ==============================================================
+@@ -2900,6 +2888,26 @@ with only_when(toolkit_gtk):
+ set_config("MOZ_ENABLE_DBUS", True)
+ set_define("MOZ_ENABLE_DBUS", True)
+
++# Remoting protocol support
++# ==============================================================
++
++@depends(
++ toolkit,
++ depends("--enable-dbus", when=toolkit_gtk)(lambda x: x),
++ depends(wayland_headers, when=toolkit_gtk)(lambda x: x),
++ depends(x11_headers, when=toolkit_gtk)(lambda x: x),
++)
++def has_remote(toolkit, dbus, wayland, x11):
++ if toolkit in ("windows", "cocoa"):
++ return True
++ if toolkit == "gtk":
++ if not dbus and wayland and not x11:
++ return
++ return True
++
++
++set_config("MOZ_HAS_REMOTE", has_remote)
++set_define("MOZ_HAS_REMOTE", has_remote)
+
+ # Necko's wifi scanner
+ # ==============================================================
diff --git
a/http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 864741e..0000000
--- a/http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777
firefox-100.0/widget/gtk/nsWindow.cpp
---- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02
11:29:06.763325015 +0200
-+++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334
+0200
-@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR
- GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK |
GDK_SCROLL_MASK |
-- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK;
-+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK |
-+ GDK_FOCUS_CHANGE_MASK;
-
- /* utility functions */
- static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX,
diff --git
a/http/firefox/patches/0023-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0023-bmo-1754469-memory_mozalloc_throw.patch
deleted file mode 100644
index 634892be..0000000
--- a/http/firefox/patches/0023-bmo-1754469-memory_mozalloc_throw.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/memory/mozalloc/throw_gcc.h 2022-02-02 17:33:38 UTC
-+++ b/memory/mozalloc/throw_gcc.h
-@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
- mozalloc_abort("fatal: STL threw bad_function_call");
- }
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_logic_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_domain_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_invalid_argument(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_length_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_out_of_range(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_runtime_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_range_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_overflow_error(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_underflow_error(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_ios_failure(
- const char* msg) {
diff --git
a/http/firefox/patches/0023-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0023-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
new file mode 100644
index 0000000..51f7faa
--- /dev/null
+++ b/http/firefox/patches/0023-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
@@ -0,0 +1,55 @@
+From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel AT octaforge.org>
+Date: Fri, 23 Sep 2022 02:38:29 +0200
+Subject: [PATCH] fix sqlite3 on ppc with clang
+
+The __ppc__ macro is always defined on clang but not gcc, which
+results in sqlite mistakenly thinking that ppc64le with clang
+is big endian.
+
+Also disable some inline assembly stuff on ppc that is never used
+with gcc and probably was never tested with modern machines.
+---
+ third_party/sqlite3/src/sqlite3.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/sqlite3/src/sqlite3.c
b/third_party/sqlite3/src/sqlite3.c
+index 4f3dc68..9017062 100644
+--- a/third_party/sqlite3/src/sqlite3.c
++++ b/third_party/sqlite3/src/sqlite3.c
+@@ -14317,9 +14317,9 @@ typedef INT16_TYPE LogEst;
+ # if defined(i386) || defined(__i386__) || defined(_M_IX86) ||
\
+ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) ||
\
+ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) ||
\
+- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
++ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) ||
defined(__LITTLE_ENDIAN__)
+ # define SQLITE_BYTEORDER 1234
+-# elif defined(sparc) || defined(__ppc__) || \
++# elif defined(sparc) || defined(__BIG_ENDIAN__) || \
+ defined(__ARMEB__) || defined(__AARCH64EB__)
+ # define SQLITE_BYTEORDER 4321
+ # else
+@@ -20713,7 +20713,7 @@ SQLITE_PRIVATE const char
**sqlite3CompileOptions(int *pnOpt);
+ return val;
+ }
+
+-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
++#elif 0
+
+ __inline__ sqlite_uint64 sqlite3Hwtime(void){
+ unsigned long long retval;
+@@ -196385,9 +196385,9 @@ struct RtreeMatchArg {
+ #if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
+ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
+- defined(__arm__)
++ defined(__arm__) || defined(__LITTLE_ENDIAN__)
+ # define SQLITE_BYTEORDER 1234
+-#elif defined(sparc) || defined(__ppc__)
++#elif defined(sparc) || defined(__BIG_ENDIAN__)
+ # define SQLITE_BYTEORDER 4321
+ #else
+ # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
+--
+2.37.3
+
diff --git
a/http/firefox/patches/0024-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0024-bgo-860033-firefox-wayland-no-dbus.patch
deleted file mode 100644
index 7cf532a..0000000
--- a/http/firefox/patches/0024-bgo-860033-firefox-wayland-no-dbus.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -2353,18 +2353,6 @@ with only_when(compile_environment & tar
- )
- set_config("MOZ_D3DCOMPILER_VISTA_DLL_PATH", d3d_compiler_dll.path)
-
--# Remoting protocol support
--# ==============================================================
--
--
--@depends(toolkit)
--def has_remote(toolkit):
-- if toolkit in ("gtk", "windows", "cocoa"):
-- return True
--
--
--set_config("MOZ_HAS_REMOTE", has_remote)
--set_define("MOZ_HAS_REMOTE", has_remote)
-
- # RLBox Library Sandboxing wasm support
- # ==============================================================
-@@ -2900,6 +2888,26 @@ with only_when(toolkit_gtk):
- set_config("MOZ_ENABLE_DBUS", True)
- set_define("MOZ_ENABLE_DBUS", True)
-
-+# Remoting protocol support
-+# ==============================================================
-+
-+@depends(
-+ toolkit,
-+ depends("--enable-dbus", when=toolkit_gtk)(lambda x: x),
-+ depends(wayland_headers, when=toolkit_gtk)(lambda x: x),
-+ depends(x11_headers, when=toolkit_gtk)(lambda x: x),
-+)
-+def has_remote(toolkit, dbus, wayland, x11):
-+ if toolkit in ("windows", "cocoa"):
-+ return True
-+ if toolkit == "gtk":
-+ if not dbus and wayland and not x11:
-+ return
-+ return True
-+
-+
-+set_config("MOZ_HAS_REMOTE", has_remote)
-+set_define("MOZ_HAS_REMOTE", has_remote)
-
- # Necko's wifi scanner
- # ==============================================================
diff --git a/http/firefox/patches/0024-fix-building-gcc-pgo.patch
b/http/firefox/patches/0024-fix-building-gcc-pgo.patch
new file mode 100644
index 0000000..699d67a
--- /dev/null
+++ b/http/firefox/patches/0024-fix-building-gcc-pgo.patch
@@ -0,0 +1,66 @@
+diff -up firefox-112.0/build/pgo/profileserver.py.pgo
firefox-112.0/build/pgo/profileserver.py
+--- firefox-112.0/build/pgo/profileserver.py.pgo 2023-04-06
17:27:40.000000000 +0200
++++ firefox-112.0/build/pgo/profileserver.py 2023-04-06 21:29:33.772294479
+0200
+@@ -11,7 +11,7 @@ import subprocess
+ import sys
+
+ import mozcrash
+-from mozbuild.base import BinaryNotFoundException, MozbuildObject
++from mozbuild.base import BinaryNotFoundException, MozbuildObject,
BuildEnvironmentNotFoundException
+ from mozfile import TemporaryDirectory
+ from mozhttpd import MozHttpd
+ from mozprofile import FirefoxProfile, Preferences
+@@ -87,9 +87,22 @@ if __name__ == "__main__":
+ locations = ServerLocations()
+ locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
+
+- old_profraw_files = glob.glob("*.profraw")
+- for f in old_profraw_files:
+- os.remove(f)
++ using_gcc = False
++ try:
++ if build.config_environment.substs.get('CC_TYPE') == 'gcc':
++ using_gcc = True
++ except BuildEnvironmentNotFoundException:
++ pass
++
++ if using_gcc:
++ for dirpath, _, filenames in os.walk('.'):
++ for f in filenames:
++ if f.endswith('.gcda'):
++ os.remove(os.path.join(dirpath, f))
++ else:
++ old_profraw_files = glob.glob('*.profraw')
++ for f in old_profraw_files:
++ os.remove(f)
+
+ with TemporaryDirectory() as profilePath:
+ # TODO: refactor this into mozprofile
+diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-112.0/toolkit/components/terminator/nsTerminator.cpp
+--- firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2023-04-06 17:27:57.000000000 +0200
++++ firefox-112.0/toolkit/components/terminator/nsTerminator.cpp
2023-04-06 21:27:32.538089108 +0200
+@@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() {
+ }
+ #endif
+
++ // Disable watchdog for PGO train builds - writting profile information at
++ // exit may take time and it is better to make build hang rather than
++ // silently produce poorly performing binary.
++ crashAfterMS = INT32_MAX;
++
+ UniquePtr<Options> options(new Options());
+ // crashAfterTicks is guaranteed to be > 0 as
+ // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
+diff -up firefox-114.0.2/build/moz.configure/lto-pgo.configure.pgo
firefox-114.0.2/build/moz.configure/lto-pgo.configure
+--- firefox-114.0.2/build/moz.configure/lto-pgo.configure.pgo 2023-06-22
11:17:37.428552356 +0200
++++ firefox-114.0.2/build/moz.configure/lto-pgo.configure 2023-06-22
11:17:51.476033691 +0200
+@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target
+ return namespace(
+ gen_cflags=["-fprofile-generate"],
+ gen_ldflags=["-fprofile-generate"],
+- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
++ use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wno-coverage-mismatch"],
+ use_ldflags=["-fprofile-use"],
+ )
+
+
diff --git a/http/firefox/patches/0025-disable-avx-from-skia.patch
b/http/firefox/patches/0025-disable-avx-from-skia.patch
new file mode 100644
index 0000000..d7ce687
--- /dev/null
+++ b/http/firefox/patches/0025-disable-avx-from-skia.patch
@@ -0,0 +1,22 @@
+diff -up firefox-115.0/gfx/skia/generate_mozbuild.py.old
firefox-115.0/gfx/skia/generate_mozbuild.py
+--- firefox-115.0/gfx/skia/generate_mozbuild.py.old 2023-07-03
15:45:48.324343303 +0200
++++ firefox-115.0/gfx/skia/generate_mozbuild.py 2023-07-03
15:46:03.098854139 +0200
+@@ -54,7 +54,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
+ SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
+- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
+ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c',
'-mfma']
+ if not CONFIG["MOZ_CODE_COVERAGE"]:
+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f',
'-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
+diff -up firefox-115.0/gfx/skia/moz.build.old
firefox-115.0/gfx/skia/moz.build
+--- firefox-115.0/gfx/skia/moz.build.old 2023-07-03 15:45:29.988709343
+0200
++++ firefox-115.0/gfx/skia/moz.build 2023-07-03 15:45:39.971054486 +0200
+@@ -565,7 +565,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
+ SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
+- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
+ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c',
'-mfma']
+ if not CONFIG["MOZ_CODE_COVERAGE"]:
+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f',
'-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
diff --git
a/http/firefox/patches/0025-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0025-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
deleted file mode 100644
index 51f7faa..0000000
--- a/http/firefox/patches/0025-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel AT octaforge.org>
-Date: Fri, 23 Sep 2022 02:38:29 +0200
-Subject: [PATCH] fix sqlite3 on ppc with clang
-
-The __ppc__ macro is always defined on clang but not gcc, which
-results in sqlite mistakenly thinking that ppc64le with clang
-is big endian.
-
-Also disable some inline assembly stuff on ppc that is never used
-with gcc and probably was never tested with modern machines.
----
- third_party/sqlite3/src/sqlite3.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/third_party/sqlite3/src/sqlite3.c
b/third_party/sqlite3/src/sqlite3.c
-index 4f3dc68..9017062 100644
---- a/third_party/sqlite3/src/sqlite3.c
-+++ b/third_party/sqlite3/src/sqlite3.c
-@@ -14317,9 +14317,9 @@ typedef INT16_TYPE LogEst;
- # if defined(i386) || defined(__i386__) || defined(_M_IX86) ||
\
- defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) ||
\
- defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) ||
\
-- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
-+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) ||
defined(__LITTLE_ENDIAN__)
- # define SQLITE_BYTEORDER 1234
--# elif defined(sparc) || defined(__ppc__) || \
-+# elif defined(sparc) || defined(__BIG_ENDIAN__) || \
- defined(__ARMEB__) || defined(__AARCH64EB__)
- # define SQLITE_BYTEORDER 4321
- # else
-@@ -20713,7 +20713,7 @@ SQLITE_PRIVATE const char
**sqlite3CompileOptions(int *pnOpt);
- return val;
- }
-
--#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
-+#elif 0
-
- __inline__ sqlite_uint64 sqlite3Hwtime(void){
- unsigned long long retval;
-@@ -196385,9 +196385,9 @@ struct RtreeMatchArg {
- #if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
- defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
- defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
-- defined(__arm__)
-+ defined(__arm__) || defined(__LITTLE_ENDIAN__)
- # define SQLITE_BYTEORDER 1234
--#elif defined(sparc) || defined(__ppc__)
-+#elif defined(sparc) || defined(__BIG_ENDIAN__)
- # define SQLITE_BYTEORDER 4321
- #else
- # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
---
-2.37.3
-
diff --git a/http/firefox/patches/0026-fix-building-gcc-pgo.patch
b/http/firefox/patches/0026-fix-building-gcc-pgo.patch
deleted file mode 100644
index eb520b4..0000000
--- a/http/firefox/patches/0026-fix-building-gcc-pgo.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Naur a/build/pgo/profileserver.py b/build/pgo/profileserver.py
---- a/build/pgo/profileserver.py 2023-01-12 22:01:59.000000000 +0200
-+++ b/build/pgo/profileserver.py 2023-01-17 06:56:38.260296740 +0200
-@@ -11,7 +11,7 @@
- import sys
-
- import mozcrash
--from mozbuild.base import BinaryNotFoundException, MozbuildObject
-+from mozbuild.base import BinaryNotFoundException, MozbuildObject,
BuildEnvironmentNotFoundException
- from mozfile import TemporaryDirectory
- from mozhttpd import MozHttpd
- from mozprofile import FirefoxProfile, Preferences
-@@ -87,9 +87,22 @@
- locations = ServerLocations()
- locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
-
-- old_profraw_files = glob.glob("*.profraw")
-- for f in old_profraw_files:
-- os.remove(f)
-+ using_gcc = False
-+ try:
-+ if build.config_environment.substs.get("CC_TYPE") == "gcc":
-+ using_gcc = True
-+ except BuildEnvironmentNotFoundException:
-+ pass
-+
-+ if using_gcc:
-+ for dirpath, _, filenames in os.walk("."):
-+ for f in filenames:
-+ if f.endswith(".gcda"):
-+ os.remove(os.path.join(dirpath, f))
-+ else:
-+ old_profraw_files = glob.glob("*.profraw")
-+ for f in old_profraw_files:
-+ os.remove(f)
-
- with TemporaryDirectory() as profilePath:
- # TODO: refactor this into mozprofile
-@@ -213,6 +226,11 @@
- print("Firefox exited successfully, but produced a crashreport")
- sys.exit(1)
-
-+ if using_gcc:
-+ print("Copying profile data...")
-+ os.system("pwd");
-+ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd
..; tar xf instrumented/profdata.tar.gz;');
-+
- llvm_profdata = env.get("LLVM_PROFDATA")
- if llvm_profdata:
- profraw_files = glob.glob("*.profraw")
diff --git
a/http/firefox/patches/0027-bgo-908297-ppc64-webrtc-missing-conditions-114.patch

b/http/firefox/patches/0027-bgo-908297-ppc64-webrtc-missing-conditions-114.patch
deleted file mode 100644
index 14e8c4a..0000000
---
a/http/firefox/patches/0027-bgo-908297-ppc64-webrtc-missing-conditions-114.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-#https://www.talospace.com/2023/06/firefox-114-on-power.html
-#https://gist.github.com/classilla/95b5dd53627528448f8512a82205672c
-
-diff -r 954df08c7f0b third_party/libwebrtc/moz.build
---- a/third_party/libwebrtc/moz.build Tue Jun 06 08:55:21 2023 +0000
-+++ b/third_party/libwebrtc/moz.build Mon Jun 19 09:33:12 2023 -0700
-@@ -595,16 +595,28 @@
- "/third_party/libwebrtc/modules/desktop_capture/primitives_gn",
- "/third_party/libwebrtc/modules/portal/portal_gn",
- "/third_party/libwebrtc/third_party/drm/drm_gn",
- "/third_party/libwebrtc/third_party/gbm/gbm_gn",
- "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn",
- "/third_party/libwebrtc/third_party/pipewire/pipewire_gn"
- ]
-
-+if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux":
-+
-+ DIRS += [
-+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
-+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn",
-+ "/third_party/libwebrtc/modules/portal/portal_gn",
-+ "/third_party/libwebrtc/third_party/drm/drm_gn",
-+ "/third_party/libwebrtc/third_party/gbm/gbm_gn",
-+ "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn",
-+ "/third_party/libwebrtc/third_party/pipewire/pipewire_gn"
-+ ]
-+
- if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "OpenBSD":
-
- DIRS += [
- "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn",
- "/third_party/libwebrtc/common_audio/common_audio_neon_gn"
- ]
-
- if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "OpenBSD":
diff --git a/http/firefox/patches/0027-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0027-bgo-908297-ppc64-webrtc.patch
new file mode 100644
index 0000000..14e8c4a
--- /dev/null
+++ b/http/firefox/patches/0027-bgo-908297-ppc64-webrtc.patch
@@ -0,0 +1,35 @@
+#https://www.talospace.com/2023/06/firefox-114-on-power.html
+#https://gist.github.com/classilla/95b5dd53627528448f8512a82205672c
+
+diff -r 954df08c7f0b third_party/libwebrtc/moz.build
+--- a/third_party/libwebrtc/moz.build Tue Jun 06 08:55:21 2023 +0000
++++ b/third_party/libwebrtc/moz.build Mon Jun 19 09:33:12 2023 -0700
+@@ -595,16 +595,28 @@
+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn",
+ "/third_party/libwebrtc/modules/portal/portal_gn",
+ "/third_party/libwebrtc/third_party/drm/drm_gn",
+ "/third_party/libwebrtc/third_party/gbm/gbm_gn",
+ "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn",
+ "/third_party/libwebrtc/third_party/pipewire/pipewire_gn"
+ ]
+
++if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux":
++
++ DIRS += [
++ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
++ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn",
++ "/third_party/libwebrtc/modules/portal/portal_gn",
++ "/third_party/libwebrtc/third_party/drm/drm_gn",
++ "/third_party/libwebrtc/third_party/gbm/gbm_gn",
++ "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn",
++ "/third_party/libwebrtc/third_party/pipewire/pipewire_gn"
++ ]
++
+ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "OpenBSD":
+
+ DIRS += [
+ "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn",
+ "/third_party/libwebrtc/common_audio/common_audio_neon_gn"
+ ]
+
+ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "OpenBSD":
diff --git
a/http/firefox/patches/0028-bmo-1835829-non-unified-build-skia-fix.patch
b/http/firefox/patches/0028-bmo-1835829-non-unified-build-skia-fix.patch
deleted file mode 100644
index 4b86096..0000000
--- a/http/firefox/patches/0028-bmo-1835829-non-unified-build-skia-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naur a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
---- a/gfx/skia/generate_mozbuild.py 2023-06-06 13:26:33.188693705 -0000
-+++ b/gfx/skia/generate_mozbuild.py 2023-06-06 13:27:25.821463691 -0000
-@@ -61,6 +61,8 @@
- elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang',
'gcc'):
- SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags +=
['-march=armv8-a+crc']
-
-+DEFINES['MOZ_SKIA'] = True
-+
- DEFINES['SKIA_IMPLEMENTATION'] = 1
-
- DEFINES['SK_PDF_USE_HARFBUZZ_SUBSETTING'] = 1
-diff -Naur a/gfx/skia/moz.build b/gfx/skia/moz.build
---- a/gfx/skia/moz.build 2023-06-06 13:26:33.189693720 -0000
-+++ b/gfx/skia/moz.build 2023-06-06 13:27:48.805802442 -0000
-@@ -572,6 +572,8 @@
- elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang',
'gcc'):
- SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags +=
['-march=armv8-a+crc']
-
-+DEFINES['MOZ_SKIA'] = True
-+
- DEFINES['SKIA_IMPLEMENTATION'] = 1
-
- DEFINES['SK_PDF_USE_HARFBUZZ_SUBSETTING'] = 1
diff --git a/http/firefox/patches/0028-bmo-1840931-elfhack-pgo-fix.patch
b/http/firefox/patches/0028-bmo-1840931-elfhack-pgo-fix.patch
new file mode 100644
index 0000000..6d88bc5
--- /dev/null
+++ b/http/firefox/patches/0028-bmo-1840931-elfhack-pgo-fix.patch
@@ -0,0 +1,165 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla AT glandium.org>
+# Date 1688068580 0
+# Node ID 51b78cf4881b07422c0c6e590e863b095257e9e1
+# Parent eef8bff2d6117cc88dcca9ab4718be0f5186924b
+Bug 1840931 - More properly handle files > 4GB in elfhack. r=gsvelto
+
+I'm pretty sure there are other theoretical problems in the code,
+notably when a single section is larger than 4GB, but by the time
+we reach that limit, bug 1839740 will have been fixed.
+
+Differential Revision: https://phabricator.services.mozilla.com/D182447
+
+diff --git a/build/unix/elfhack/elf.cpp b/build/unix/elfhack/elf.cpp
+--- a/build/unix/elfhack/elf.cpp
++++ b/build/unix/elfhack/elf.cpp
+@@ -344,17 +344,17 @@ ElfSection* Elf::getSection(int index) {
+ break;
+ default:
+ sections[index] = new ElfSection(*tmp_shdr[index], tmp_file, this);
+ }
+ }
+ return sections[index];
+ }
+
+-ElfSection* Elf::getSectionAt(unsigned int offset) {
++ElfSection* Elf::getSectionAt(Elf64_Off offset) {
+ for (int i = 1; i < ehdr->e_shnum; i++) {
+ ElfSection* section = getSection(i);
+ if ((section != nullptr) && (section->getFlags() & SHF_ALLOC) &&
+ !(section->getFlags() & SHF_TLS) && (offset >= section->getAddr())
&&
+ (offset < section->getAddr() + section->getSize()))
+ return section;
+ }
+ return nullptr;
+@@ -529,38 +529,38 @@ ElfSection::ElfSection(Elf_Shdr& s, std:
+ // Only SHT_REL/SHT_RELA sections use sh_info to store a section
+ // number.
+ if ((shdr.sh_type == SHT_REL) || (shdr.sh_type == SHT_RELA))
+ info.section = shdr.sh_info ? parent->getSection(shdr.sh_info) :
nullptr;
+ else
+ info.index = shdr.sh_info;
+ }
+
+-unsigned int ElfSection::getAddr() {
++Elf64_Addr ElfSection::getAddr() {
+ if (shdr.sh_addr != (Elf64_Addr)-1) return shdr.sh_addr;
+
+ // It should be safe to adjust sh_addr for all allocated sections that
+ // are neither SHT_NOBITS nor SHT_PROGBITS
+ if ((previous != nullptr) && isRelocatable()) {
+ unsigned int addr = previous->getAddr();
+ if (previous->getType() != SHT_NOBITS) addr += previous->getSize();
+
+ if (addr & (getAddrAlign() - 1)) addr = (addr | (getAddrAlign() - 1)) +
1;
+
+ return (shdr.sh_addr = addr);
+ }
+ return shdr.sh_addr;
+ }
+
+-unsigned int ElfSection::getOffset() {
++Elf64_Off ElfSection::getOffset() {
+ if (shdr.sh_offset != (Elf64_Off)-1) return shdr.sh_offset;
+
+ if (previous == nullptr) return (shdr.sh_offset = 0);
+
+- unsigned int offset = previous->getOffset();
++ Elf64_Off offset = previous->getOffset();
+
+ ElfSegment* ptload = getSegmentByType(PT_LOAD);
+ ElfSegment* prev_ptload = previous->getSegmentByType(PT_LOAD);
+
+ if (ptload && (ptload == prev_ptload)) {
+ offset += getAddr() - previous->getAddr();
+ return (shdr.sh_offset = offset);
+ }
+diff --git a/build/unix/elfhack/elfhack.cpp b/build/unix/elfhack/elfhack.cpp
+--- a/build/unix/elfhack/elfhack.cpp
++++ b/build/unix/elfhack/elfhack.cpp
+@@ -1255,18 +1255,18 @@ int do_relocation_section(Elf* elf, unsi
+ "Expected to find an .eh_frame section adjacent to .eh_frame_hdr");
+ }
+ if (eh_frame && first->getAddr() > relhack->getAddr() &&
+ second->getAddr() < first_executable->getAddr()) {
+ // The distance between both sections needs to be preserved because
+ // eh_frame_hdr contains relative offsets to eh_frame. Well, they could
be
+ // relocated too, but it's not worth the effort for the few number of
bytes
+ // this would save.
+- unsigned int distance = second->getAddr() - first->getAddr();
+- unsigned int origAddr = eh_frame->getAddr();
++ Elf64_Off distance = second->getAddr() - first->getAddr();
++ Elf64_Addr origAddr = eh_frame->getAddr();
+ ElfSection* previous = first->getPrevious();
+ first->getShdr().sh_addr = (previous->getAddr() + previous->getSize() +
+ first->getAddrAlign() - 1) &
+ ~(first->getAddrAlign() - 1);
+ second->getShdr().sh_addr =
+ (first->getAddr() + std::min(first->getSize(), distance) +
+ second->getAddrAlign() - 1) &
+ ~(second->getAddrAlign() - 1);
+diff --git a/build/unix/elfhack/elfxx.h b/build/unix/elfhack/elfxx.h
+--- a/build/unix/elfhack/elfxx.h
++++ b/build/unix/elfhack/elfxx.h
+@@ -280,17 +280,17 @@ typedef serializable<Elf_Shdr_Traits> El
+ class Elf {
+ public:
+ Elf(std::ifstream& file);
+ ~Elf();
+
+ /* index == -1 is treated as index == ehdr.e_shstrndx */
+ ElfSection* getSection(int index);
+
+- ElfSection* getSectionAt(unsigned int offset);
++ ElfSection* getSectionAt(Elf64_Off offset);
+
+ ElfSegment* getSegmentByType(unsigned int type, ElfSegment* last =
nullptr);
+
+ ElfDynamic_Section* getDynSection();
+
+ void normalize();
+ void write(std::ofstream& file);
+
+@@ -329,18 +329,18 @@ class ElfSection {
+
+ ElfSection(Elf_Shdr& s, std::ifstream* file, Elf* parent);
+
+ virtual ~ElfSection() { free(data); }
+
+ const char* getName() { return name; }
+ unsigned int getType() { return shdr.sh_type; }
+ unsigned int getFlags() { return shdr.sh_flags; }
+- unsigned int getAddr();
+- unsigned int getSize() { return shdr.sh_size; }
++ Elf64_Addr getAddr();
++ Elf64_Off getSize() { return shdr.sh_size; }
+ unsigned int getAddrAlign() { return shdr.sh_addralign; }
+ unsigned int getEntSize() { return shdr.sh_entsize; }
+ const char* getData() { return data; }
+ ElfSection* getLink() { return link; }
+ SectionInfo getInfo() { return info; }
+
+ void shrink(unsigned int newsize) {
+ if (newsize < shdr.sh_size) {
+@@ -353,17 +353,17 @@ class ElfSection {
+ if (newsize > shdr.sh_size) {
+ data = static_cast<char*>(realloc(data, newsize));
+ memset(data + shdr.sh_size, 0, newsize - shdr.sh_size);
+ shdr.sh_size = newsize;
+ markDirty();
+ }
+ }
+
+- unsigned int getOffset();
++ Elf64_Off getOffset();
+ int getIndex();
+ Elf_Shdr& getShdr();
+
+ ElfSection* getNext() { return next; }
+ ElfSection* getPrevious() { return previous; }
+
+ virtual bool isRelocatable() {
+ return ((getType() == SHT_SYMTAB) || (getType() == SHT_STRTAB) ||
+
diff --git a/http/firefox/patches/0029-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0029-bmo-1516803-gcc-lto-sandbox.patch
new file mode 100644
index 0000000..eff08f6
--- /dev/null
+++ b/http/firefox/patches/0029-bmo-1516803-gcc-lto-sandbox.patch
@@ -0,0 +1,16 @@
+diff -Naur a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
+--- a/security/sandbox/linux/moz.build 2023-07-04 13:57:56.029462755 +0300
++++ b/security/sandbox/linux/moz.build 2023-07-04 14:05:08.607221195 +0300
+@@ -114,9 +114,9 @@
+ # gcc lto likes to put the top level asm in syscall.cc in a different
partition
+ # from the function using it which breaks the build. Work around that by
+ # forcing there to be only one partition.
+-for f in CONFIG["OS_CXXFLAGS"]:
+- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
+- LDFLAGS += ["--param lto-partitions=1"]
++if CONFIG['CC_TYPE'] != 'clang':
++ LDFLAGS += ['--param', 'lto-partitions=1']
++
+
+ DEFINES["NS_NO_XPCOM"] = True
+ DisableStlWrapping()
diff --git a/http/firefox/patches/0029-disable-avx512-from-skia.patch
b/http/firefox/patches/0029-disable-avx512-from-skia.patch
deleted file mode 100644
index 115b85a..0000000
--- a/http/firefox/patches/0029-disable-avx512-from-skia.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -Naur a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
---- a/gfx/skia/generate_mozbuild.py 2023-06-06 13:33:58.416408698 -0000
-+++ b/gfx/skia/generate_mozbuild.py 2023-06-06 13:35:33.082879776 -0000
-@@ -56,7 +56,8 @@
- SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c',
'-mfma']
-- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f',
'-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
-+ if not CONFIG["MOZ_CODE_COVERAGE"]:
-+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f',
'-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
- elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang',
'gcc'):
- SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags +=
['-march=armv8-a+crc']
-
-diff -Naur a/gfx/skia/moz.build b/gfx/skia/moz.build
---- a/gfx/skia/moz.build 2023-06-06 13:33:58.417408714 -0000
-+++ b/gfx/skia/moz.build 2023-06-06 13:36:13.276507433 -0000
-@@ -567,7 +567,8 @@
- SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c',
'-mfma']
-- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f',
'-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
-+ if not CONFIG["MOZ_CODE_COVERAGE"]:
-+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f',
'-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
- elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang',
'gcc'):
- SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags +=
['-march=armv8-a+crc']
-
diff --git a/http/firefox/patches/0030-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0030-enable-vaapi-on-all-amd-cards.patch
new file mode 100644
index 0000000..112cd42
--- /dev/null
+++ b/http/firefox/patches/0030-enable-vaapi-on-all-amd-cards.patch
@@ -0,0 +1,19 @@
+diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi
firefox-115.0/widget/gtk/GfxInfo.cpp
+--- firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-06-29
12:18:53.179833765 +0200
++++ firefox-115.0/widget/gtk/GfxInfo.cpp 2023-06-29 12:19:33.256212776
+0200
+@@ -970,14 +970,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
+ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
+ V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", "");
+
+- // Disable on Release/late Beta on AMD
+-#if !defined(EARLY_BETA_OR_EARLIER)
+- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::AtiAll,
+- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
+- nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
+- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
+- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE",
"");
+-#endif
+ ////////////////////////////////////
+ // FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST
+ APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All,
+
diff --git
a/http/firefox/patches/0031-bmo-1839023-arm-unified-build-missing-header.patch

b/http/firefox/patches/0031-bmo-1839023-arm-unified-build-missing-header.patch
new file mode 100644
index 0000000..ae426cd
--- /dev/null
+++
b/http/firefox/patches/0031-bmo-1839023-arm-unified-build-missing-header.patch
@@ -0,0 +1,77 @@
+
+# HG changeset patch
+# User serge-sans-paille <sguelton AT mozilla.com>
+# Date 1687447863 0
+# Node ID 34ef9f4d1d2c638f47eb4615a6ea47c011c91e87
+# Parent eecca96ba9040cb07462280dda39d8551fc8c098
+Bug 1839023 - Fix missing arm-specifc header r=nbp
+
+Differential Revision: https://phabricator.services.mozilla.com/D181738
+
+diff --git a/js/src/jit/shared/AtomicOperations-shared-jit.cpp
b/js/src/jit/shared/AtomicOperations-shared-jit.cpp
+--- a/js/src/jit/shared/AtomicOperations-shared-jit.cpp
++++ b/js/src/jit/shared/AtomicOperations-shared-jit.cpp
+@@ -1,16 +1,20 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ #include "jit/AtomicOperations.h"
+
++#if defined(__arm__)
++# include "jit/arm/Architecture-arm.h"
++#endif
++
+ #ifdef JS_HAVE_GENERATED_ATOMIC_OPS
+
+ # include <atomic>
+
+ # include "js/GCAPI.h"
+
+ using namespace js;
+ using namespace js::jit;
+@@ -73,18 +77,18 @@ void AtomicMemcpyDownUnsynchronized(uint
+ const uint8_t* lim = src + nbytes;
+
+ // Set up bulk copying. The cases are ordered the way they are on the
+ // assumption that if we can achieve aligned copies even with a little
+ // preprocessing then that is better than unaligned copying on a platform
+ // that supports it.
+
+ if (nbytes >= WORDSIZE) {
+- void (*copyBlock)(uint8_t * dest, const uint8_t* src);
+- void (*copyWord)(uint8_t * dest, const uint8_t* src);
++ void (*copyBlock)(uint8_t* dest, const uint8_t* src);
++ void (*copyWord)(uint8_t* dest, const uint8_t* src);
+
+ if (((uintptr_t(dest) ^ uintptr_t(src)) & WORDMASK) == 0) {
+ const uint8_t* cutoff = (const uint8_t*)RoundUp(uintptr_t(src),
WORDSIZE);
+ MOZ_ASSERT(cutoff <= lim); // because nbytes >= WORDSIZE
+ while (src < cutoff) {
+ AtomicCopyByteUnsynchronized(dest++, src++);
+ }
+ copyBlock = AtomicCopyBlockDownUnsynchronized;
+@@ -126,18 +130,18 @@ void AtomicMemcpyUpUnsynchronized(uint8_
+ JS::AutoSuppressGCAnalysis nogc;
+
+ const uint8_t* lim = src;
+
+ src += nbytes;
+ dest += nbytes;
+
+ if (nbytes >= WORDSIZE) {
+- void (*copyBlock)(uint8_t * dest, const uint8_t* src);
+- void (*copyWord)(uint8_t * dest, const uint8_t* src);
++ void (*copyBlock)(uint8_t* dest, const uint8_t* src);
++ void (*copyWord)(uint8_t* dest, const uint8_t* src);
+
+ if (((uintptr_t(dest) ^ uintptr_t(src)) & WORDMASK) == 0) {
+ const uint8_t* cutoff = (const uint8_t*)(uintptr_t(src) & ~WORDMASK);
+ MOZ_ASSERT(cutoff >= lim); // Because nbytes >= WORDSIZE
+ while (src > cutoff) {
+ AtomicCopyByteUnsynchronized(--dest, --src);
+ }
+ copyBlock = AtomicCopyBlockUpUnsynchronized;
+
diff --git
a/http/firefox/patches/0032-bmo-1838655-arm-unified-build-missing-include.patch

b/http/firefox/patches/0032-bmo-1838655-arm-unified-build-missing-include.patch
new file mode 100644
index 0000000..7f147b5
--- /dev/null
+++
b/http/firefox/patches/0032-bmo-1838655-arm-unified-build-missing-include.patch
@@ -0,0 +1,32 @@
+
+# HG changeset patch
+# User serge-sans-paille <sguelton AT mozilla.com>
+# Date 1687446945 0
+# Node ID 1adf82bd9e2cf5acf7d0436e32586c989caab721
+# Parent e26973ce42e90c24534a8e08674cbf3e86b4fe72
+Bug 1838655 - Add missing include for ByteBuf.h r=chutten
+
+Differential Revision: https://phabricator.services.mozilla.com/D181448
+
+diff --git a/toolkit/components/glean/ipc/Support.cpp
b/toolkit/components/glean/ipc/Support.cpp
+--- a/toolkit/components/glean/ipc/Support.cpp
++++ b/toolkit/components/glean/ipc/Support.cpp
+@@ -5,16 +5,17 @@
+
+ // This file is for support functions for the Rust IPC module.
+ // Some information just isn't available to Rust and must be made available
over
+ // FFI.
+ #include "FOGIPC.h"
+ #include "mozilla/AppShutdown.h"
+ #include "mozilla/ClearOnShutdown.h"
+ #include "mozilla/glean/GleanMetrics.h"
++#include "mozilla/ipc/ByteBuf.h"
+ #include "mozilla/Unused.h"
+ #include "nsThreadUtils.h"
+
+ using mozilla::AppShutdown;
+ using mozilla::RunOnShutdown;
+ using mozilla::ShutdownPhase;
+ using mozilla::Unused;
+ using mozilla::glean::FlushFOGData;
+
diff --git
a/http/firefox/patches/0033-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0033-bgo-907963-rustflags-single-string.patch
new file mode 100644
index 0000000..a56aec4
--- /dev/null
+++ b/http/firefox/patches/0033-bgo-907963-rustflags-single-string.patch
@@ -0,0 +1,76 @@
+--- firefox-111.0.1/build/moz.configure/rust.configure 2023-03-21
06:16:03.000000000 -0700
++++ firefox-111.0.1/build/moz.configure/rust.configure.new 2023-04-05
08:57:29.403219120 -0700
+@@ -593,7 +593,7 @@
+
+ # ==============================================================
+
+-option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags")
++option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags",
comma_split=False)
+ set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags))
+
+
+--- firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py
2023-03-21 06:16:09.000000000 -0700
++++ firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py.new
2023-04-05 08:57:31.270193468 -0700
+@@ -191,6 +191,10 @@
+ to instantiate an option indirectly. Set this to a positive integer to
+ force the script to look into a deeper stack frame when inferring the
+ `category`.
++ - `comma_split` specifies whether the value string should be split on
++ commas. The default is True. Setting it False is necessary for things
++ like compiler flags which should be a single string that may contain
++ commas.
+ """
+
+ __slots__ = (
+@@ -205,6 +209,7 @@
+ "possible_origins",
+ "category",
+ "define_depth",
++ "comma_split",
+ )
+
+ def __init__(
+@@ -218,6 +223,7 @@
+ category=None,
+ help=None,
+ define_depth=0,
++ comma_split=True,
+ ):
+ if not name and not env:
+ raise InvalidOptionError(
+@@ -335,9 +341,10 @@
+ self.choices = choices
+ self.help = help
+ self.category = category or _infer_option_category(define_depth)
++ self.comma_split = comma_split
+
+ @staticmethod
+- def split_option(option):
++ def split_option(option, comma_split=True):
+ """Split a flag or variable into a prefix, a name and values
+
+ Variables come in the form NAME=values (no prefix).
+@@ -350,7 +357,13 @@
+
+ elements = option.split("=", 1)
+ name = elements[0]
+- values = tuple(elements[1].split(",")) if len(elements) == 2 else ()
++ if len(elements) == 2:
++ if comma_split:
++ values = tuple(elements[1].split(","))
++ else:
++ values = (elements[1],)
++ else:
++ values = ()
+ if name.startswith("--"):
+ name = name[2:]
+ if not name.islower():
+@@ -426,7 +439,7 @@
+ % (option, origin, ", ".join(self.possible_origins))
+ )
+
+- prefix, name, values = self.split_option(option)
++ prefix, name, values = self.split_option(option, self.comma_split)
+ option = self._join_option(prefix, name)
+
+ assert name in (self.name, self.env)



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b307733eee4b40f39b11e05d95d24386189d7cd6), Pavel Vinogradov, 07/04/2023

Archive powered by MHonArc 2.6.24.

Top of Page