Skip to Content.
Sympa Menu

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

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, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (e7256274e39bb58dc7357891f1c890233a6e95f4)
  • Date: Fri, 8 Nov 2024 18:46:40 +0000

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

http/firefox/HISTORY
| 3
http/firefox/patches/0009-build-Disable-Werror.patch
| 24 +

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

http/firefox/patches/0010-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 ++
http/firefox/patches/0010-build-Disable-Werror.patch
| 24 -

http/firefox/patches/0011-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 --
http/firefox/patches/0011-bgo-816975-fix-build-on-x86.patch
| 16 +
http/firefox/patches/0012-bgo-816975-fix-build-on-x86.patch
| 16 -
http/firefox/patches/0012-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13 +
http/firefox/patches/0013-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13 -
http/firefox/patches/0013-bmo-1754469-memory_mozalloc_throw.patch
| 69 +++++
http/firefox/patches/0014-bmo-1516803-gcc-lto-sandbox.patch
| 16 +
http/firefox/patches/0014-bmo-1754469-memory_mozalloc_throw.patch
| 69 -----
http/firefox/patches/0015-bmo-1516803-gcc-lto-sandbox.patch
| 16 -
http/firefox/patches/0015-enable-vaapi-on-all-amd-cards.patch
| 19 +

http/firefox/patches/0016-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 +
http/firefox/patches/0016-enable-vaapi-on-all-amd-cards.patch
| 19 -

http/firefox/patches/0017-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 -
http/firefox/patches/0017-gcc-lto-pgo-from-fedora.patch
| 128 ++++++++++
http/firefox/patches/0018-bmo-1862601-system-icu-74.patch
| 41 +++
http/firefox/patches/0018-gcc-lto-pgo-from-fedora.patch
| 128 ----------
http/firefox/patches/0019-bgo-748849-RUST_TARGET_override.patch
| 61 ++++
http/firefox/patches/0019-bmo-1862601-system-icu-74.patch
| 41 ---
http/firefox/patches/0020-bgo-748849-RUST_TARGET_override.patch
| 61 ----
http/firefox/patches/0020-bmo-1559213-Support-system-av1.patch
| 96 +++++++
http/firefox/patches/0021-bmo-1559213-Support-system-av1.patch
| 96 -------
http/firefox/patches/0021-bmo-1874059-fix-libcxx-18.patch
| 16 +
http/firefox/patches/0022-bmo-1874059-fix-libcxx-18.patch
| 16 -
http/firefox/patches/0022-dont-use-build-id.patch
| 13 +
http/firefox/patches/0023-dont-use-build-id.patch
| 13 -

http/firefox/patches/0023-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
| 14 +

http/firefox/patches/0024-bgo-925101-force-software-rendering-during-pgo-build.patch
| 16 +

http/firefox/patches/0024-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
| 14 -

http/firefox/patches/0025-bgo-925101-force-software-rendering-during-pgo-build.patch
| 16 -
http/firefox/patches/0025-bgo-929967-fix-pgo-on-musl.patch
| 14 +
http/firefox/patches/0026-bgo-929967-fix-pgo-on-musl.patch
| 14 -
http/firefox/patches/0026-gcc-always-inline-from-fedora.patch
| 14 +
http/firefox/patches/0027-bmo-1914774-fix-non-unified-gcc-build.patch
| 78 ++++++
http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
| 14 -
http/firefox/patches/0028-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 24 +
http/firefox/patches/0029-bmo-1928364-musl-make-sys_fork-non-fatal.patch
| 34 ++
41 files changed, 763 insertions(+), 652 deletions(-)

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

http/firefox: updated patches for 132.0.x

diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index a421005..2591150 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,6 @@
+2024-11-08 Pavel Vinogradov <public AT sourcemage.org>
+ * patches/*: updated
+
2024-11-05 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 132.0.1

diff --git a/http/firefox/patches/0009-build-Disable-Werror.patch
b/http/firefox/patches/0009-build-Disable-Werror.patch
new file mode 100644
index 0000000..e1df117
--- /dev/null
+++ b/http/firefox/patches/0009-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/0009-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

b/http/firefox/patches/0009-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
deleted file mode 100644
index 9de0db7..0000000
---
a/http/firefox/patches/0009-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/0010-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0010-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..32bd0eb
--- /dev/null
+++
b/http/firefox/patches/0010-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/0010-build-Disable-Werror.patch
b/http/firefox/patches/0010-build-Disable-Werror.patch
deleted file mode 100644
index e1df117..0000000
--- a/http/firefox/patches/0010-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/0011-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0011-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
deleted file mode 100644
index 32bd0eb..0000000
---
a/http/firefox/patches/0011-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/0011-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0011-bgo-816975-fix-build-on-x86.patch
new file mode 100644
index 0000000..4b2289f
--- /dev/null
+++ b/http/firefox/patches/0011-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/0012-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0012-bgo-816975-fix-build-on-x86.patch
deleted file mode 100644
index 4b2289f..0000000
--- a/http/firefox/patches/0012-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/0012-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0012-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..864741e
--- /dev/null
+++ b/http/firefox/patches/0012-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/0013-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0013-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 864741e..0000000
--- a/http/firefox/patches/0013-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/0013-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0013-bmo-1754469-memory_mozalloc_throw.patch
new file mode 100644
index 0000000..634892be
--- /dev/null
+++ b/http/firefox/patches/0013-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/0014-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0014-bmo-1516803-gcc-lto-sandbox.patch
new file mode 100644
index 0000000..eff08f6
--- /dev/null
+++ b/http/firefox/patches/0014-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/0014-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0014-bmo-1754469-memory_mozalloc_throw.patch
deleted file mode 100644
index 634892be..0000000
--- a/http/firefox/patches/0014-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/0015-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0015-bmo-1516803-gcc-lto-sandbox.patch
deleted file mode 100644
index eff08f6..0000000
--- a/http/firefox/patches/0015-bmo-1516803-gcc-lto-sandbox.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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/0015-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0015-enable-vaapi-on-all-amd-cards.patch
new file mode 100644
index 0000000..112cd42
--- /dev/null
+++ b/http/firefox/patches/0015-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/0016-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch

b/http/firefox/patches/0016-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
new file mode 100644
index 0000000..bb0621a
--- /dev/null
+++
b/http/firefox/patches/0016-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
@@ -0,0 +1,20 @@
+--- a/security/sandbox/linux/Sandbox.cpp 2023-07-10 20:29:48.000000000 +0100
++++ b/security/sandbox/linux/Sandbox.cpp 2023-07-15 09:13:43.561724668
+0100
+@@ -18,6 +18,8 @@
+ #include <dirent.h>
+ #ifdef NIGHTLY_BUILD
+ # include "dlfcn.h"
++#else
++# include <dlfcn.h>
+ #endif
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -685,7 +687,7 @@
+ files->Add("/proc/stat", SandboxOpenedFile::Error{});
+ files->Add("/proc/net/unix", SandboxOpenedFile::Error{});
+ files->Add("/proc/self/maps", SandboxOpenedFile::Error{});
+-
++ Unused << dlopen("libgcc_s.so.1", RTLD_GLOBAL|RTLD_LAZY);
+ // Finally, start the sandbox.
+ SetCurrentProcessSandbox(GetMediaSandboxPolicy(files));
+ }
\ No newline at end of file
diff --git a/http/firefox/patches/0016-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0016-enable-vaapi-on-all-amd-cards.patch
deleted file mode 100644
index 112cd42..0000000
--- a/http/firefox/patches/0016-enable-vaapi-on-all-amd-cards.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-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/0017-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch

b/http/firefox/patches/0017-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0017-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/security/sandbox/linux/Sandbox.cpp 2023-07-10 20:29:48.000000000 +0100
-+++ b/security/sandbox/linux/Sandbox.cpp 2023-07-15 09:13:43.561724668
+0100
-@@ -18,6 +18,8 @@
- #include <dirent.h>
- #ifdef NIGHTLY_BUILD
- # include "dlfcn.h"
-+#else
-+# include <dlfcn.h>
- #endif
- #include <errno.h>
- #include <fcntl.h>
-@@ -685,7 +687,7 @@
- files->Add("/proc/stat", SandboxOpenedFile::Error{});
- files->Add("/proc/net/unix", SandboxOpenedFile::Error{});
- files->Add("/proc/self/maps", SandboxOpenedFile::Error{});
--
-+ Unused << dlopen("libgcc_s.so.1", RTLD_GLOBAL|RTLD_LAZY);
- // Finally, start the sandbox.
- SetCurrentProcessSandbox(GetMediaSandboxPolicy(files));
- }
\ No newline at end of file
diff --git a/http/firefox/patches/0017-gcc-lto-pgo-from-fedora.patch
b/http/firefox/patches/0017-gcc-lto-pgo-from-fedora.patch
new file mode 100644
index 0000000..3d8a0b1
--- /dev/null
+++ b/http/firefox/patches/0017-gcc-lto-pgo-from-fedora.patch
@@ -0,0 +1,128 @@
+diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo
firefox-128.0/build/moz.configure/lto-pgo.configure
+--- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02
00:34:14.000000000 +0200
++++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02
17:59:44.425650444 +0200
+@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi
+
+ @depends(
+ "--enable-profile-use",
++ c_compiler,
+ pgo_profile_path,
+ llvm_profdata,
+ llvm_profdata_order,
+ build_environment,
+ )
+-def orderfile_path(profile_use, path, profdata, profdata_order, build_env):
++def orderfile_path(profile_use, compiler, path, profdata, profdata_order,
build_env):
++ if compiler.type == "gcc":
++ return None
++
+ if not profile_use:
+ return None
+
+@@ -133,7 +137,7 @@ def pgo_flags(
+ 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 -up firefox-128.0/build/pgo/profileserver.py.pgo
firefox-128.0/build/pgo/profileserver.py
+--- firefox-128.0/build/pgo/profileserver.py.pgo 2024-07-02
00:34:15.000000000 +0200
++++ firefox-128.0/build/pgo/profileserver.py 2024-07-02 17:59:44.425650444
+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
+@@ -97,9 +97,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-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build
+--- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200
++++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200
+@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]:
+ # The file uses SSE2 intrinsics, so it needs special compile flags on
some
+ # compilers.
+ SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"]
++ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
+ SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"]
++ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
+ SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"]
+ elif CONFIG["TARGET_CPU"].startswith("mips"):
+diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo
firefox-128.0/gfx/skia/generate_mozbuild.py
+--- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02
17:59:44.425650444 +0200
++++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02
18:17:40.973081400 +0200
+@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
+ skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
+- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
+- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
+ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
+diff -up firefox-128.0/gfx/skia/moz.build.pgo
firefox-128.0/gfx/skia/moz.build
+--- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444
+0200
++++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200
+@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
+ skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
+- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
+- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
+ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
+diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
+--- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2024-07-02 00:34:32.000000000 +0200
++++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
2024-07-02 17:59:44.425650444 +0200
+@@ -332,6 +332,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 --git a/http/firefox/patches/0018-bmo-1862601-system-icu-74.patch
b/http/firefox/patches/0018-bmo-1862601-system-icu-74.patch
new file mode 100644
index 0000000..617dd76
--- /dev/null
+++ b/http/firefox/patches/0018-bmo-1862601-system-icu-74.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/917599
+https://bugzilla.mozilla.org/show_bug.cgi?id=1862601
+https://hg.mozilla.org/try/rev/d5f3b0c4f08a426ce00a153c04e177eecb6820e2
+
+# HG changeset patch
+# User André Bargull <andre.bargull AT gmail.com>
+# Date 1697435923 -7200
+# Node ID d5f3b0c4f08a426ce00a153c04e177eecb6820e2
+# Parent c63994f8259efdf6e745c960aa9e1409d5477049
+Bug xxx - Part 12: Add new line break classes. r?
+
+diff --git a/intl/lwbrk/LineBreaker.cpp b/intl/lwbrk/LineBreaker.cpp
+--- a/intl/lwbrk/LineBreaker.cpp
++++ b/intl/lwbrk/LineBreaker.cpp
+@@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB
+ /* JT = 34, [JT] */ CLASS_CHARACTER,
+ /* JV = 35, [JV] */ CLASS_CHARACTER,
+ /* CLOSE_PARENTHESIS = 36, [CP] */
CLASS_CLOSE_LIKE_CHARACTER,
+ /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
+ /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER,
+ /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
+ /* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
+ /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
+- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
++ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
++ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
++ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
++ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
++ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
++ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
++ };
+
+ static_assert(U_LB_COUNT ==
mozilla::ArrayLength(sUnicodeLineBreakToClass),
+ "Gecko vs ICU LineBreak class mismatch");
+
+ auto cls = GetLineBreakClass(u);
+ MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
+
+ // Overrides based on rules for the different line-break values given in
+
+
diff --git a/http/firefox/patches/0018-gcc-lto-pgo-from-fedora.patch
b/http/firefox/patches/0018-gcc-lto-pgo-from-fedora.patch
deleted file mode 100644
index 3d8a0b1..0000000
--- a/http/firefox/patches/0018-gcc-lto-pgo-from-fedora.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo
firefox-128.0/build/moz.configure/lto-pgo.configure
---- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02
00:34:14.000000000 +0200
-+++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02
17:59:44.425650444 +0200
-@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi
-
- @depends(
- "--enable-profile-use",
-+ c_compiler,
- pgo_profile_path,
- llvm_profdata,
- llvm_profdata_order,
- build_environment,
- )
--def orderfile_path(profile_use, path, profdata, profdata_order, build_env):
-+def orderfile_path(profile_use, compiler, path, profdata, profdata_order,
build_env):
-+ if compiler.type == "gcc":
-+ return None
-+
- if not profile_use:
- return None
-
-@@ -133,7 +137,7 @@ def pgo_flags(
- 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 -up firefox-128.0/build/pgo/profileserver.py.pgo
firefox-128.0/build/pgo/profileserver.py
---- firefox-128.0/build/pgo/profileserver.py.pgo 2024-07-02
00:34:15.000000000 +0200
-+++ firefox-128.0/build/pgo/profileserver.py 2024-07-02 17:59:44.425650444
+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
-@@ -97,9 +97,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-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build
---- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200
-+++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200
-@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]:
- # The file uses SSE2 intrinsics, so it needs special compile flags on
some
- # compilers.
- SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
-- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"]
-+ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
- SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
-- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"]
-+ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
- SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"]
- elif CONFIG["TARGET_CPU"].startswith("mips"):
-diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo
firefox-128.0/gfx/skia/generate_mozbuild.py
---- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02
17:59:44.425650444 +0200
-+++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02
18:17:40.973081400 +0200
-@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
- if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
- skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
-- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
-- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
-+ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
-+ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
- SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
-diff -up firefox-128.0/gfx/skia/moz.build.pgo
firefox-128.0/gfx/skia/moz.build
---- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444
+0200
-+++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200
-@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
- if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
- skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
-- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
-- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
-+ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
-+ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
- SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
-diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
---- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2024-07-02 00:34:32.000000000 +0200
-+++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
2024-07-02 17:59:44.425650444 +0200
-@@ -332,6 +332,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 --git a/http/firefox/patches/0019-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0019-bgo-748849-RUST_TARGET_override.patch
new file mode 100644
index 0000000..f109538
--- /dev/null
+++ b/http/firefox/patches/0019-bgo-748849-RUST_TARGET_override.patch
@@ -0,0 +1,61 @@
+From: Sam James <sam AT gentoo.org>
+Subject: Allow RUST_TARGET override for detected Rust triplet (fixes musl
build)
+
+Respect RUST_TARGET from the environment to override Mozilla's
+own triplet detection.
+
+If the variable is unset, the old logic is used.
+
+The issue is that Gentoo supports both, say:
+- x86_64-unknown-linux-musl, and
+- x86-64-gentoo-linux-musl
+
+Our Rust is built to understand
+-gentoo- as a vendor target, but
+our Rust only actually includes
+-unknown-.
+
+Mozilla's configure sees -gentoo-
+in CHOST and that Rust _understands_
+-gentoo- and tries to use it, without
+verifying that we actually have
+-gentoo- installed as a Rust target.
+
+This requires exporting RUST_TARGET
+in the ebuild, possibly like:
+````
+inherit rust-toolchain
+
+src_configure() {
+ [...]
+ export RUST_TARGET=$(rust_abi)
+ [...]
+}
+````
+
+Inspired by Alpine's patch at
+https://git.alpinelinux.org/aports/tree/community/firefox/fix-rust-target.patch?id=740922900cf8042be6751fcfcccdd3fc11bd77d3.
+
+Bug: https://bugs.gentoo.org/748849
+Bug: https://bugs.gentoo.org/779178
+Bug: https://bugs.gentoo.org/836226
+Thanks-to: Georgy Yakovlev <gyakovlev AT gentoo.org>
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -275,6 +275,7 @@ def rust_supported_targets(rustc):
+ return data
+
+
++@imports('os')
+ def detect_rustc_target(
+ host_or_target, compiler_info, arm_target, rust_supported_targets
+ ):
+@@ -396,7 +397,7 @@ def detect_rustc_target(
+
+ return None
+
+- rustc_target = find_candidate(candidates)
++ rustc_target = os.environ.get('RUST_TARGET', find_candidate(candidates))
+
+ if rustc_target is None:
+ die("Don't know how to translate {} for
rustc".format(host_or_target.alias))
diff --git a/http/firefox/patches/0019-bmo-1862601-system-icu-74.patch
b/http/firefox/patches/0019-bmo-1862601-system-icu-74.patch
deleted file mode 100644
index 617dd76..0000000
--- a/http/firefox/patches/0019-bmo-1862601-system-icu-74.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://bugs.gentoo.org/917599
-https://bugzilla.mozilla.org/show_bug.cgi?id=1862601
-https://hg.mozilla.org/try/rev/d5f3b0c4f08a426ce00a153c04e177eecb6820e2
-
-# HG changeset patch
-# User André Bargull <andre.bargull AT gmail.com>
-# Date 1697435923 -7200
-# Node ID d5f3b0c4f08a426ce00a153c04e177eecb6820e2
-# Parent c63994f8259efdf6e745c960aa9e1409d5477049
-Bug xxx - Part 12: Add new line break classes. r?
-
-diff --git a/intl/lwbrk/LineBreaker.cpp b/intl/lwbrk/LineBreaker.cpp
---- a/intl/lwbrk/LineBreaker.cpp
-+++ b/intl/lwbrk/LineBreaker.cpp
-@@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB
- /* JT = 34, [JT] */ CLASS_CHARACTER,
- /* JV = 35, [JV] */ CLASS_CHARACTER,
- /* CLOSE_PARENTHESIS = 36, [CP] */
CLASS_CLOSE_LIKE_CHARACTER,
- /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
- /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER,
- /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
- /* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
- /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
-- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
-+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
-+ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
-+ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
-+ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
-+ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
-+ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
-+ };
-
- static_assert(U_LB_COUNT ==
mozilla::ArrayLength(sUnicodeLineBreakToClass),
- "Gecko vs ICU LineBreak class mismatch");
-
- auto cls = GetLineBreakClass(u);
- MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
-
- // Overrides based on rules for the different line-break values given in
-
-
diff --git a/http/firefox/patches/0020-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0020-bgo-748849-RUST_TARGET_override.patch
deleted file mode 100644
index f109538..0000000
--- a/http/firefox/patches/0020-bgo-748849-RUST_TARGET_override.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Sam James <sam AT gentoo.org>
-Subject: Allow RUST_TARGET override for detected Rust triplet (fixes musl
build)
-
-Respect RUST_TARGET from the environment to override Mozilla's
-own triplet detection.
-
-If the variable is unset, the old logic is used.
-
-The issue is that Gentoo supports both, say:
-- x86_64-unknown-linux-musl, and
-- x86-64-gentoo-linux-musl
-
-Our Rust is built to understand
--gentoo- as a vendor target, but
-our Rust only actually includes
--unknown-.
-
-Mozilla's configure sees -gentoo-
-in CHOST and that Rust _understands_
--gentoo- and tries to use it, without
-verifying that we actually have
--gentoo- installed as a Rust target.
-
-This requires exporting RUST_TARGET
-in the ebuild, possibly like:
-````
-inherit rust-toolchain
-
-src_configure() {
- [...]
- export RUST_TARGET=$(rust_abi)
- [...]
-}
-````
-
-Inspired by Alpine's patch at
-https://git.alpinelinux.org/aports/tree/community/firefox/fix-rust-target.patch?id=740922900cf8042be6751fcfcccdd3fc11bd77d3.
-
-Bug: https://bugs.gentoo.org/748849
-Bug: https://bugs.gentoo.org/779178
-Bug: https://bugs.gentoo.org/836226
-Thanks-to: Georgy Yakovlev <gyakovlev AT gentoo.org>
---- a/build/moz.configure/rust.configure
-+++ b/build/moz.configure/rust.configure
-@@ -275,6 +275,7 @@ def rust_supported_targets(rustc):
- return data
-
-
-+@imports('os')
- def detect_rustc_target(
- host_or_target, compiler_info, arm_target, rust_supported_targets
- ):
-@@ -396,7 +397,7 @@ def detect_rustc_target(
-
- return None
-
-- rustc_target = find_candidate(candidates)
-+ rustc_target = os.environ.get('RUST_TARGET', find_candidate(candidates))
-
- if rustc_target is None:
- die("Don't know how to translate {} for
rustc".format(host_or_target.alias))
diff --git a/http/firefox/patches/0020-bmo-1559213-Support-system-av1.patch
b/http/firefox/patches/0020-bmo-1559213-Support-system-av1.patch
new file mode 100644
index 0000000..240ef56
--- /dev/null
+++ b/http/firefox/patches/0020-bmo-1559213-Support-system-av1.patch
@@ -0,0 +1,96 @@
+diff --git a/config/external/moz.build b/config/external/moz.build
+index 2fc8df57992e..63d18e50a961 100644
+--- a/config/external/moz.build
++++ b/config/external/moz.build
+@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
+ external_dirs += ["media/libvpx"]
+
+ if CONFIG["MOZ_AV1"]:
+- external_dirs += ["media/libaom"]
+- external_dirs += ["media/libdav1d"]
++ if not CONFIG["MOZ_SYSTEM_AV1"]:
++ external_dirs += ["media/libaom"]
++ external_dirs += ["media/libdav1d"]
+
+ if not CONFIG["MOZ_SYSTEM_PNG"]:
+ external_dirs += ["media/libpng"]
+diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
+index 5c6e25b3980b..ce99ebfb6d3f 100644
+--- a/dom/media/platforms/moz.build
++++ b/dom/media/platforms/moz.build
+@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]:
+ "agnostic/AOMDecoder.cpp",
+ "agnostic/DAV1DDecoder.cpp",
+ ]
++ if CONFIG['MOZ_SYSTEM_AV1']:
++ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
++ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
+
+ if CONFIG["MOZ_OMX"]:
+ EXPORTS += [
+diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+index 761fc8cf4cd9..793a5b8697a8 100644
+--- a/media/ffvpx/libavcodec/moz.build
++++ b/media/ffvpx/libavcodec/moz.build
+@@ -120,10 +120,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
+ 'vp9recon.c',
+ 'vpx_rac.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']
++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
++ else:
++ USE_LIBS += [
++ 'dav1d',
++ 'media_libdav1d_asm',
++ ]
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ LOCAL_INCLUDES += ['/media/mozva']
+ SOURCES += [
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+index f93a5d64fec8..814357f4e979 100644
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -744,7 +744,23 @@ def av1(value):
+ return True
+
+
+-@depends(target, when=av1 & compile_environment)
++option("--with-system-av1",
++ help="Use system av1 (located with pkgconfig)")
++
++system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
++ when="--with-system-av1")
++
++system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >=
0.1.1",
++ when="--with-system-av1")
++
++@depends(system_libaom_info, system_libdav1d_info)
++def system_av1(system_libaom_info, system_libdav1d_info):
++ has_av1_libs = False
++ if system_libaom_info and system_libdav1d_info:
++ has_av1_libs = True
++ return has_av1_libs
++
++@depends(target, when=av1 & depends(system_av1)(lambda v: not v) &
compile_environment)
+ def dav1d_asm(target):
+ if target.cpu in ("aarch64", "x86", "x86_64"):
+ return True
+@@ -760,6 +776,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
+ set_define("MOZ_DAV1D_ASM", dav1d_asm)
+ set_config("MOZ_AV1", av1)
+ set_define("MOZ_AV1", av1)
++set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
+
+ # JXL Image Codec Support
+ # ==============================================================
+
+
diff --git a/http/firefox/patches/0021-bmo-1559213-Support-system-av1.patch
b/http/firefox/patches/0021-bmo-1559213-Support-system-av1.patch
deleted file mode 100644
index 240ef56..0000000
--- a/http/firefox/patches/0021-bmo-1559213-Support-system-av1.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff --git a/config/external/moz.build b/config/external/moz.build
-index 2fc8df57992e..63d18e50a961 100644
---- a/config/external/moz.build
-+++ b/config/external/moz.build
-@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
- external_dirs += ["media/libvpx"]
-
- if CONFIG["MOZ_AV1"]:
-- external_dirs += ["media/libaom"]
-- external_dirs += ["media/libdav1d"]
-+ if not CONFIG["MOZ_SYSTEM_AV1"]:
-+ external_dirs += ["media/libaom"]
-+ external_dirs += ["media/libdav1d"]
-
- if not CONFIG["MOZ_SYSTEM_PNG"]:
- external_dirs += ["media/libpng"]
-diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
-index 5c6e25b3980b..ce99ebfb6d3f 100644
---- a/dom/media/platforms/moz.build
-+++ b/dom/media/platforms/moz.build
-@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]:
- "agnostic/AOMDecoder.cpp",
- "agnostic/DAV1DDecoder.cpp",
- ]
-+ if CONFIG['MOZ_SYSTEM_AV1']:
-+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-
- if CONFIG["MOZ_OMX"]:
- EXPORTS += [
-diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
-index 761fc8cf4cd9..793a5b8697a8 100644
---- a/media/ffvpx/libavcodec/moz.build
-+++ b/media/ffvpx/libavcodec/moz.build
-@@ -120,10 +120,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
- 'vp9recon.c',
- 'vpx_rac.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']
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+ else:
-+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
-+ ]
- if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
- LOCAL_INCLUDES += ['/media/mozva']
- SOURCES += [
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index f93a5d64fec8..814357f4e979 100644
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -744,7 +744,23 @@ def av1(value):
- return True
-
-
--@depends(target, when=av1 & compile_environment)
-+option("--with-system-av1",
-+ help="Use system av1 (located with pkgconfig)")
-+
-+system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
-+ when="--with-system-av1")
-+
-+system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >=
0.1.1",
-+ when="--with-system-av1")
-+
-+@depends(system_libaom_info, system_libdav1d_info)
-+def system_av1(system_libaom_info, system_libdav1d_info):
-+ has_av1_libs = False
-+ if system_libaom_info and system_libdav1d_info:
-+ has_av1_libs = True
-+ return has_av1_libs
-+
-+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) &
compile_environment)
- def dav1d_asm(target):
- if target.cpu in ("aarch64", "x86", "x86_64"):
- return True
-@@ -760,6 +776,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
- set_define("MOZ_DAV1D_ASM", dav1d_asm)
- set_config("MOZ_AV1", av1)
- set_define("MOZ_AV1", av1)
-+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
-
- # JXL Image Codec Support
- # ==============================================================
-
-
diff --git a/http/firefox/patches/0021-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0021-bmo-1874059-fix-libcxx-18.patch
new file mode 100644
index 0000000..b21a93c
--- /dev/null
+++ b/http/firefox/patches/0021-bmo-1874059-fix-libcxx-18.patch
@@ -0,0 +1,16 @@
+--- a/build/moz.configure/toolchain.configure 2024-03-16 22:53:15.409390707
+0000
++++ b/build/moz.configure/toolchain.configure 2024-03-16 22:57:02.661805132
+0000
+@@ -2183,10 +2183,10 @@
+ set_define("_LIBCPP_HIDE_FROM_ABI",
libcxx_override_visibility.hide_from_abi)
+
+
+-@depends(target, build_environment)
+-def visibility_flags(target, env):
++@depends(target, build_environment, c_compiler)
++def visibility_flags(target, env, c_compiler):
+ if target.os != "WINNT":
+- if target.kernel == "Darwin":
++ if target.kernel == "Darwin" or (c_compiler.type == "clang" and
c_compiler.version >= "17.0.0"):
+ return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
+ return (
+ "-I%s/system_wrappers" % os.path.join(env.dist),
\ No newline at end of file
diff --git a/http/firefox/patches/0022-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0022-bmo-1874059-fix-libcxx-18.patch
deleted file mode 100644
index b21a93c..0000000
--- a/http/firefox/patches/0022-bmo-1874059-fix-libcxx-18.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/build/moz.configure/toolchain.configure 2024-03-16 22:53:15.409390707
+0000
-+++ b/build/moz.configure/toolchain.configure 2024-03-16 22:57:02.661805132
+0000
-@@ -2183,10 +2183,10 @@
- set_define("_LIBCPP_HIDE_FROM_ABI",
libcxx_override_visibility.hide_from_abi)
-
-
--@depends(target, build_environment)
--def visibility_flags(target, env):
-+@depends(target, build_environment, c_compiler)
-+def visibility_flags(target, env, c_compiler):
- if target.os != "WINNT":
-- if target.kernel == "Darwin":
-+ if target.kernel == "Darwin" or (c_compiler.type == "clang" and
c_compiler.version >= "17.0.0"):
- return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
- return (
- "-I%s/system_wrappers" % os.path.join(env.dist),
\ No newline at end of file
diff --git a/http/firefox/patches/0022-dont-use-build-id.patch
b/http/firefox/patches/0022-dont-use-build-id.patch
new file mode 100644
index 0000000..4ec8ac1
--- /dev/null
+++ b/http/firefox/patches/0022-dont-use-build-id.patch
@@ -0,0 +1,13 @@
+diff '--color=auto' -Naur a/build/moz.configure/flags.configure
b/build/moz.configure/flags.configure
+--- a/build/moz.configure/flags.configure 2024-07-08 20:04:44.944708403
+0300
++++ b/build/moz.configure/flags.configure 2024-07-08 20:13:30.867064722
+0300
+@@ -197,9 +197,6 @@
+
+ check_and_add_flag("-pipe", when=building_with_gcc)
+
+-check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
+-check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
+-
+ check_and_add_asm_flag("-Wa,--noexecstack",
when=building_with_gnu_compatible_cc)
+ check_and_add_linker_flag("-Wl,-z,noexecstack",
when=building_with_gnu_compatible_cc)
+ check_and_add_linker_flag("-Wl,-z,text",
when=building_with_gnu_compatible_cc)
diff --git a/http/firefox/patches/0023-dont-use-build-id.patch
b/http/firefox/patches/0023-dont-use-build-id.patch
deleted file mode 100644
index 4ec8ac1..0000000
--- a/http/firefox/patches/0023-dont-use-build-id.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff '--color=auto' -Naur a/build/moz.configure/flags.configure
b/build/moz.configure/flags.configure
---- a/build/moz.configure/flags.configure 2024-07-08 20:04:44.944708403
+0300
-+++ b/build/moz.configure/flags.configure 2024-07-08 20:13:30.867064722
+0300
-@@ -197,9 +197,6 @@
-
- check_and_add_flag("-pipe", when=building_with_gcc)
-
--check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
--check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
--
- check_and_add_asm_flag("-Wa,--noexecstack",
when=building_with_gnu_compatible_cc)
- check_and_add_linker_flag("-Wl,-z,noexecstack",
when=building_with_gnu_compatible_cc)
- check_and_add_linker_flag("-Wl,-z,text",
when=building_with_gnu_compatible_cc)
diff --git
a/http/firefox/patches/0023-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch

b/http/firefox/patches/0023-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
new file mode 100644
index 0000000..1fca899
--- /dev/null
+++
b/http/firefox/patches/0023-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
@@ -0,0 +1,14 @@
+diff -Naur a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+--- a/media/ffvpx/libavcodec/moz.build 2024-06-07 00:33:58.000000000 +0300
++++ b/media/ffvpx/libavcodec/moz.build 2024-06-10 21:13:44.142620997 +0300
+@@ -143,6 +143,10 @@
+ c11_flags = ["-std=gnu11"]
+ if CONFIG["CC_TYPE"] == "clang-cl":
+ c11_flags.insert(0, "-Xclang")
++
++if CONFIG["CC_TYPE"] == "gcc" and int(CONFIG["CC_VERSION"].split(".")[0])
>= 14:
++ c11_flags.insert(0, "-Wno-error=incompatible-pointer-types")
++
+ CFLAGS += c11_flags
+
+ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
diff --git
a/http/firefox/patches/0024-bgo-925101-force-software-rendering-during-pgo-build.patch

b/http/firefox/patches/0024-bgo-925101-force-software-rendering-during-pgo-build.patch
new file mode 100644
index 0000000..7f4b987
--- /dev/null
+++
b/http/firefox/patches/0024-bgo-925101-force-software-rendering-during-pgo-build.patch
@@ -0,0 +1,16 @@
+
+bgo#925101 for some unknown reason some users are having issues with pgo
crashing. Forcing software
+rendering to be used while pgo'ing doesn't have an impact in performance, as
hwaccel isn't used
+during pgo even when it works. The issue could be caused by
wrongly/automatically
+configured/detected gpu access anyway. The issue seems related to mesa, but
hard to pinpoint.
+
+diff '--color=auto' -Naur a/testing/profiles/profileserver/user.js
b/testing/profiles/profileserver/user.js
+--- a/testing/profiles/profileserver/user.js 2024-07-11 10:37:53.889115118
+0300
++++ b/testing/profiles/profileserver/user.js 2024-07-11 10:40:23.086996283
+0300
+@@ -11,3 +11,6 @@
+ user_pref("extensions.webextensions.warnings-as-errors", false);
+ // Turn off update
+ user_pref("app.update.disabledForTesting", true);
++// bgo#925101 mesa issues with pgo, force software rendering during pgo
++user_pref("gfx.webrender.software", true);
++
diff --git
a/http/firefox/patches/0024-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch

b/http/firefox/patches/0024-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
deleted file mode 100644
index 1fca899..0000000
---
a/http/firefox/patches/0024-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
---- a/media/ffvpx/libavcodec/moz.build 2024-06-07 00:33:58.000000000 +0300
-+++ b/media/ffvpx/libavcodec/moz.build 2024-06-10 21:13:44.142620997 +0300
-@@ -143,6 +143,10 @@
- c11_flags = ["-std=gnu11"]
- if CONFIG["CC_TYPE"] == "clang-cl":
- c11_flags.insert(0, "-Xclang")
-+
-+if CONFIG["CC_TYPE"] == "gcc" and int(CONFIG["CC_VERSION"].split(".")[0])
>= 14:
-+ c11_flags.insert(0, "-Wno-error=incompatible-pointer-types")
-+
- CFLAGS += c11_flags
-
- if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
diff --git
a/http/firefox/patches/0025-bgo-925101-force-software-rendering-during-pgo-build.patch

b/http/firefox/patches/0025-bgo-925101-force-software-rendering-during-pgo-build.patch
deleted file mode 100644
index 7f4b987..0000000
---
a/http/firefox/patches/0025-bgo-925101-force-software-rendering-during-pgo-build.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-bgo#925101 for some unknown reason some users are having issues with pgo
crashing. Forcing software
-rendering to be used while pgo'ing doesn't have an impact in performance, as
hwaccel isn't used
-during pgo even when it works. The issue could be caused by
wrongly/automatically
-configured/detected gpu access anyway. The issue seems related to mesa, but
hard to pinpoint.
-
-diff '--color=auto' -Naur a/testing/profiles/profileserver/user.js
b/testing/profiles/profileserver/user.js
---- a/testing/profiles/profileserver/user.js 2024-07-11 10:37:53.889115118
+0300
-+++ b/testing/profiles/profileserver/user.js 2024-07-11 10:40:23.086996283
+0300
-@@ -11,3 +11,6 @@
- user_pref("extensions.webextensions.warnings-as-errors", false);
- // Turn off update
- user_pref("app.update.disabledForTesting", true);
-+// bgo#925101 mesa issues with pgo, force software rendering during pgo
-+user_pref("gfx.webrender.software", true);
-+
diff --git a/http/firefox/patches/0025-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0025-bgo-929967-fix-pgo-on-musl.patch
new file mode 100644
index 0000000..3c8457e
--- /dev/null
+++ b/http/firefox/patches/0025-bgo-929967-fix-pgo-on-musl.patch
@@ -0,0 +1,14 @@
+diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
+index 7354714..0385792 100755
+--- a/build/pgo/profileserver.py
++++ b/build/pgo/profileserver.py
+@@ -171,6 +171,9 @@ if __name__ == "__main__":
+ env["UPLOAD_PATH"], "profile-run-1.log"
+ )
+
++ # Workaround for https://bugs.gentoo.org/929967
++ env["LD_LIBRARY_PATH"] = os.path.join(os.getcwd(), "dist", "bin")
++
+ # Run Firefox a first time to initialize its profile
+ runner = FirefoxRunner(
+ profile=profile,
diff --git a/http/firefox/patches/0026-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0026-bgo-929967-fix-pgo-on-musl.patch
deleted file mode 100644
index 3c8457e..0000000
--- a/http/firefox/patches/0026-bgo-929967-fix-pgo-on-musl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
-index 7354714..0385792 100755
---- a/build/pgo/profileserver.py
-+++ b/build/pgo/profileserver.py
-@@ -171,6 +171,9 @@ if __name__ == "__main__":
- env["UPLOAD_PATH"], "profile-run-1.log"
- )
-
-+ # Workaround for https://bugs.gentoo.org/929967
-+ env["LD_LIBRARY_PATH"] = os.path.join(os.getcwd(), "dist", "bin")
-+
- # Run Firefox a first time to initialize its profile
- runner = FirefoxRunner(
- profile=profile,
diff --git a/http/firefox/patches/0026-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0026-gcc-always-inline-from-fedora.patch
new file mode 100644
index 0000000..d7af60f
--- /dev/null
+++ b/http/firefox/patches/0026-gcc-always-inline-from-fedora.patch
@@ -0,0 +1,14 @@
+diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
+--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
+@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
+ }
+
+ #else
+-// GCC is slower when dealing with always_inline, especially in debug
builds.
+-// When using Clang, use always_inline more aggressively.
+-# if defined(__clang__) || defined(NDEBUG)
++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
+ # define ALWAYS_INLINE __attribute__((always_inline)) inline
+ # else
+ # define ALWAYS_INLINE inline
diff --git
a/http/firefox/patches/0027-bmo-1914774-fix-non-unified-gcc-build.patch
b/http/firefox/patches/0027-bmo-1914774-fix-non-unified-gcc-build.patch
new file mode 100644
index 0000000..5a8b961
--- /dev/null
+++ b/http/firefox/patches/0027-bmo-1914774-fix-non-unified-gcc-build.patch
@@ -0,0 +1,78 @@
+
+# HG changeset patch
+# User Jamie Nicol <jnicol AT mozilla.com>
+# Date 1730754950 0
+# Node ID c3b8335e93d1828a531bb6232eeec47d8c3e28c3
+# Parent d0378618ec04083ed5fa03276a51c626ec1b7278
+Bug 1914774 - Fix non-unified GCC build. r=gfx-reviewers,lsalzman
+
+Differential Revision: https://phabricator.services.mozilla.com/D227857
+
+diff --git a/gfx/webrender_bindings/RenderTextureHost.cpp
b/gfx/webrender_bindings/RenderTextureHost.cpp
+--- a/gfx/webrender_bindings/RenderTextureHost.cpp
++++ b/gfx/webrender_bindings/RenderTextureHost.cpp
+@@ -3,16 +3,17 @@
+ /* 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 "RenderTextureHost.h"
+
+ #include "GLContext.h"
+ #include "mozilla/layers/CompositorThread.h"
++#include "mozilla/layers/TextureHost.h"
+ #include "RenderThread.h"
+
+ namespace mozilla {
+ namespace wr {
+
+ void ActivateBindAndTexParameteri(gl::GLContext* aGL, GLenum aActiveTexture,
+ GLenum aBindTarget, GLuint aBindTexture) {
+ aGL->fActiveTexture(aActiveTexture);
+@@ -39,16 +40,21 @@ wr::WrExternalImage RenderTextureHost::L
+ }
+
+ wr::WrExternalImage RenderTextureHost::LockSWGL(uint8_t aChannelIndex,
+ void* aContext,
+ RenderCompositor*
aCompositor) {
+ return InvalidToWrExternalImage();
+ }
+
++RefPtr<layers::TextureSource> RenderTextureHost::CreateTextureSource(
++ layers::TextureSourceProvider* aProvider) {
++ return nullptr;
++}
++
+ void RenderTextureHost::Destroy() {
+ MOZ_ASSERT_UNREACHABLE("unexpected to be called");
+ }
+
+ RefPtr<RenderTextureHostUsageInfo> RenderTextureHost::GetOrMergeUsageInfo(
+ const MutexAutoLock& aProofOfMapLock,
+ RefPtr<RenderTextureHostUsageInfo> aUsageInfo) {
+ MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread());
+diff --git a/gfx/webrender_bindings/RenderTextureHost.h
b/gfx/webrender_bindings/RenderTextureHost.h
+--- a/gfx/webrender_bindings/RenderTextureHost.h
++++ b/gfx/webrender_bindings/RenderTextureHost.h
+@@ -84,19 +84,17 @@ class RenderTextureHost {
+ virtual void Unlock() {}
+
+ virtual wr::WrExternalImage LockSWGL(uint8_t aChannelIndex, void*
aContext,
+ RenderCompositor* aCompositor);
+
+ virtual void UnlockSWGL() {}
+
+ virtual RefPtr<layers::TextureSource> CreateTextureSource(
+- layers::TextureSourceProvider* aProvider) {
+- return nullptr;
+- }
++ layers::TextureSourceProvider* aProvider);
+
+ virtual void ClearCachedResources() {}
+
+ // Called asynchronouly when corresponding TextureHost's
mCompositableCount
+ // becomes from 0 to 1. For now, it is used only for
+ // SurfaceTextureHost/RenderAndroidSurfaceTextureHost.
+ virtual void PrepareForUse() {}
+ // Called asynchronouly when corresponding TextureHost's is actually
going to
+
diff --git a/http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
deleted file mode 100644
index d7af60f..0000000
--- a/http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
---- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
-+++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
-@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
- }
-
- #else
--// GCC is slower when dealing with always_inline, especially in debug
builds.
--// When using Clang, use always_inline more aggressively.
--# if defined(__clang__) || defined(NDEBUG)
-+# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
- # define ALWAYS_INLINE __attribute__((always_inline)) inline
- # else
- # define ALWAYS_INLINE inline
diff --git
a/http/firefox/patches/0028-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0028-bmo-1657849-musl-sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..ffdf126
--- /dev/null
+++
b/http/firefox/patches/0028-bmo-1657849-musl-sandbox-sched_setscheduler.patch
@@ -0,0 +1,24 @@
+upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
+diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
+index ed958bc..9824433 100644
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1751,6 +1751,6 @@ class GMPSandboxPolicy : public SandboxPolicyCommon {
+ case __NR_sched_get_priority_max:
++ case __NR_sched_setscheduler:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+@@ -1926,3 +1926,2 @@ class RDDSandboxPolicy final : public
SandboxPolicyCommon {
+ case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler:
+ case __NR_sched_getattr:
+@@ -1932,2 +1931,5 @@ class RDDSandboxPolicy final : public
SandboxPolicyCommon {
+ }
++ // sched_setscheduler gets special treatment here (bug 1657849):
++ case __NR_sched_setscheduler:
++ return Allow();
+
diff --git
a/http/firefox/patches/0029-bmo-1928364-musl-make-sys_fork-non-fatal.patch
b/http/firefox/patches/0029-bmo-1928364-musl-make-sys_fork-non-fatal.patch
new file mode 100644
index 0000000..a6a850a
--- /dev/null
+++ b/http/firefox/patches/0029-bmo-1928364-musl-make-sys_fork-non-fatal.patch
@@ -0,0 +1,34 @@
+diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1597,10 +1597,14 @@
+ // fork() crash, currently, because there are too many system
+ // libraries/plugins that try to run commands. But they can
+ // usually do something reasonable on error.
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++# ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++# endif
+
+ # ifdef __NR_fadvise64
+ case __NR_fadvise64:
+ return Allow();
+ # endif
+@@ -1984,10 +1988,14 @@
+ return Allow();
+
+ // nvidia drivers may attempt to spawn nvidia-modprobe
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++# ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++# endif
+
+ // Pass through the common policy.
+ default:
+ return SandboxPolicyCommon::EvaluateSyscall(sysno);
+ }
+


  • [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (e7256274e39bb58dc7357891f1c890233a6e95f4), Pavel Vinogradov, 11/08/2024

Archive powered by MHonArc 2.6.24.

Top of Page