Skip to Content.
Sympa Menu

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

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 (cd83f7a98d81a31086a9ddde77dc4b4782ad391a)
  • Date: Tue, 29 Aug 2023 17:18:25 +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/0013-build-Disable-Werror.patch
| 24

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

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

http/firefox/patches/0015-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23

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

http/firefox/patches/0016-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23
http/firefox/patches/0016-bgo-816975-fix-build-on-x86.patch
| 16
http/firefox/patches/0017-bgo-816975-fix-build-on-x86.patch
| 16
http/firefox/patches/0017-bmo-1559213-fix-system-av1-libs.patch
| 22
http/firefox/patches/0018-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
http/firefox/patches/0018-bmo-1559213-fix-system-av1-libs.patch
| 22
http/firefox/patches/0019-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
http/firefox/patches/0019-bmo-1754469-memory_mozalloc_throw.patch
| 69 +
http/firefox/patches/0020-bgo-860033-firefox-wayland-no-dbus.patch
| 49 +
http/firefox/patches/0020-bmo-1754469-memory_mozalloc_throw.patch
| 69 -
http/firefox/patches/0021-bgo-860033-firefox-wayland-no-dbus.patch
| 49 -
http/firefox/patches/0021-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 +

http/firefox/patches/0022-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
| 98 ++
http/firefox/patches/0022-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 -
http/firefox/patches/0023-bgo-908297-ppc64-webrtc.patch
| 35

http/firefox/patches/0023-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
| 81 -
http/firefox/patches/0024-bgo-908297-ppc64-webrtc.patch
| 35
http/firefox/patches/0024-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0025-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0025-enable-vaapi-on-all-amd-cards.patch
| 19
http/firefox/patches/0026-bgo-907963-rustflags-single-string.patch
| 76 +
http/firefox/patches/0026-enable-vaapi-on-all-amd-cards.patch
| 19
http/firefox/patches/0027-bgo-907963-rustflags-single-string.patch
| 76 -

http/firefox/patches/0027-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20

http/firefox/patches/0028-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20

http/firefox/patches/0028-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
| 150 +++
http/firefox/patches/0029-bgo-911679-gcc-binutils-2.41.patch
| 60 +
http/firefox/patches/0029-bmo-1841377-musl-libc-overalignment.patch
| 104 --

http/firefox/patches/0030-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
| 105 ++

http/firefox/patches/0030-bmo-1847190-dont-use-configure_cache-for-relative-relocations.patch
| 43

http/firefox/patches/0031-bmo-1841567-stop-running-check_binary-on-host-binaries.patch
| 431 ---------

http/firefox/patches/0031-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
| 451 ++++++++++
http/firefox/patches/0032-bmo-1841571-treat-rust-libraries-as-objects.patch
| 102 --

http/firefox/patches/0033-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
| 150 ---
http/firefox/patches/0034-bgo-911679-gcc-binutils-2.41.patch
| 60 -

http/firefox/patches/0035-bmo-1847697-dont-use-pack-relative-relocs-when-it-leads-to-ld-error.patch
| 37

http/firefox/patches/0036-bmo-1837627-dont-use-YUVColorSpaceIdentity-for-YUV-pixel-formats.patch
| 184 ----

http/firefox/patches/0037-bmo-1837627-convert-AVColorRange-to-GetColorRange.patch
| 79 -
http/firefox/patches/0038-bmo-1843425-enable-vaapi-on-X11-only-build.patch
| 40

http/firefox/patches/0039-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
| 105 --
49 files changed, 1343 insertions(+), 1918 deletions(-)

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

http/firefox: version 117.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index af4e240..ed4f324 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.91" &&
+local NSS_BRANCH="3.22" &&
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 7d87618..205865d 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=116.0.3
- SECURITY_PATCH=180
+ VERSION=117.0
+ SECURITY_PATCH=181
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 65a85ff..3978915 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2023-08-29 Pavel Vinogradov <public AT sorcemage.org>
+ * DETAILS: version 117.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.92
+ * patches/*: updated
+
2023-08-17 Pavel Vinogradov <public AT sourcemage.org>
* patches/*: updated

diff --git a/http/firefox/patches/0013-build-Disable-Werror.patch
b/http/firefox/patches/0013-build-Disable-Werror.patch
new file mode 100644
index 0000000..e1df117
--- /dev/null
+++ b/http/firefox/patches/0013-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/0013-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0013-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
deleted file mode 100644
index 85c305f..0000000
---
a/http/firefox/patches/0013-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/0014-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0014-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..32bd0eb
--- /dev/null
+++
b/http/firefox/patches/0014-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/0014-build-Disable-Werror.patch
b/http/firefox/patches/0014-build-Disable-Werror.patch
deleted file mode 100644
index e1df117..0000000
--- a/http/firefox/patches/0014-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/0015-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0015-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 0000000..5e48dd2
--- /dev/null
+++
b/http/firefox/patches/0015-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/0015-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0015-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
deleted file mode 100644
index 32bd0eb..0000000
---
a/http/firefox/patches/0015-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/0016-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0016-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
deleted file mode 100644
index 5e48dd2..0000000
---
a/http/firefox/patches/0016-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/0016-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0016-bgo-816975-fix-build-on-x86.patch
new file mode 100644
index 0000000..4b2289f
--- /dev/null
+++ b/http/firefox/patches/0016-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/0017-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0017-bgo-816975-fix-build-on-x86.patch
deleted file mode 100644
index 4b2289f..0000000
--- a/http/firefox/patches/0017-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/0017-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0017-bmo-1559213-fix-system-av1-libs.patch
new file mode 100644
index 0000000..d687e8f
--- /dev/null
+++ b/http/firefox/patches/0017-bmo-1559213-fix-system-av1-libs.patch
@@ -0,0 +1,22 @@
+diff -Naur a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+--- a/media/ffvpx/libavcodec/moz.build 2023-08-01 09:34:20.242044722 +0300
++++ b/media/ffvpx/libavcodec/moz.build 2023-08-01 09:36:01.445808739 +0300
+@@ -109,10 +109,14 @@
+ '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']
++ else:
++ USE_LIBS += [
++ 'dav1d',
++ 'media_libdav1d_asm',
++ ]
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ LOCAL_INCLUDES += ['/media/mozva']
+ SOURCES += [
diff --git
a/http/firefox/patches/0018-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0018-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..864741e
--- /dev/null
+++ b/http/firefox/patches/0018-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/0018-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0018-bmo-1559213-fix-system-av1-libs.patch
deleted file mode 100644
index d687e8f..0000000
--- a/http/firefox/patches/0018-bmo-1559213-fix-system-av1-libs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -Naur a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
---- a/media/ffvpx/libavcodec/moz.build 2023-08-01 09:34:20.242044722 +0300
-+++ b/media/ffvpx/libavcodec/moz.build 2023-08-01 09:36:01.445808739 +0300
-@@ -109,10 +109,14 @@
- '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']
-+ else:
-+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
-+ ]
- if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
- LOCAL_INCLUDES += ['/media/mozva']
- SOURCES += [
diff --git
a/http/firefox/patches/0019-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0019-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 864741e..0000000
--- a/http/firefox/patches/0019-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/0019-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0019-bmo-1754469-memory_mozalloc_throw.patch
new file mode 100644
index 0000000..634892be
--- /dev/null
+++ b/http/firefox/patches/0019-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/0020-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0020-bgo-860033-firefox-wayland-no-dbus.patch
new file mode 100644
index 0000000..7cf532a
--- /dev/null
+++ b/http/firefox/patches/0020-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/0020-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0020-bmo-1754469-memory_mozalloc_throw.patch
deleted file mode 100644
index 634892be..0000000
--- a/http/firefox/patches/0020-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/0021-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0021-bgo-860033-firefox-wayland-no-dbus.patch
deleted file mode 100644
index 7cf532a..0000000
--- a/http/firefox/patches/0021-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/0021-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0021-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
new file mode 100644
index 0000000..51f7faa
--- /dev/null
+++ b/http/firefox/patches/0021-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/0022-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch

b/http/firefox/patches/0022-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
new file mode 100644
index 0000000..29d37c1
--- /dev/null
+++
b/http/firefox/patches/0022-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
@@ -0,0 +1,98 @@
+diff -Naur a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
+--- a/build/moz.configure/lto-pgo.configure 2023-08-29 08:58:52.823922531
+0300
++++ b/build/moz.configure/lto-pgo.configure 2023-08-29 09:00:07.573718920
+0300
+@@ -86,7 +86,7 @@
+ 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 -r b22cb12f611c build/pgo/profileserver.py
+--- a/build/pgo/profileserver.py Thu Oct 07 08:11:19 2021 +0000
++++ b/build/pgo/profileserver.py Sun Oct 10 20:36:46 2021 -0700
+@@ -82,19 +82,32 @@
+ docroot=os.path.join(build.topsrcdir, "build", "pgo"),
+ path_mappings=path_mappings,
+ )
+ httpd.start(block=False)
+
+ 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
+ profile_data_dir = os.path.join(build.topsrcdir, "testing",
"profiles")
+ with open(os.path.join(profile_data_dir, "profiles.json"), "r") as
fh:
+ base_profiles = json.load(fh)["profileserver"]
+
+ prefpaths = [
+@@ -207,16 +220,20 @@
+
+ # Try to move the crash reports to the artifacts even if Firefox
appears
+ # to exit successfully, in case there's a crash that doesn't set the
+ # return code to non-zero for some reason.
+ if get_crashreports(profilePath, name="Firefox exited
successfully?") != 0:
+ print("Firefox exited successfully, but produced a crashreport")
+ sys.exit(1)
+
++ 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")
+ if not profraw_files:
+ print(
+ "Could not find profraw files in the current directory:
%s"
+ % os.getcwd()
+ )
+diff -r b22cb12f611c toolkit/components/terminator/nsTerminator.cpp
+--- a/toolkit/components/terminator/nsTerminator.cpp Thu Apr 07 15:11:19
2022 +0000
++++ b/toolkit/components/terminator/nsTerminator.cpp Thu Apr 07 20:44:28
2022 -0700
+@@ -461,16 +461,21 @@
+ // Defend against overflow
+ crashAfterMS = INT32_MAX;
+ } else {
+ crashAfterMS *= scaleUp;
+ }
+ }
+ #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
+ options->crashAfterTicks = crashAfterMS / HEARTBEAT_INTERVAL_MS;
+
+ DebugOnly<PRThread*> watchdogThread =
+ CreateSystemThread(RunWatchdog, options.release());
+ MOZ_ASSERT(watchdogThread);
diff --git
a/http/firefox/patches/0022-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0022-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
deleted file mode 100644
index 51f7faa..0000000
--- a/http/firefox/patches/0022-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/0023-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0023-bgo-908297-ppc64-webrtc.patch
new file mode 100644
index 0000000..14e8c4a
--- /dev/null
+++ b/http/firefox/patches/0023-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/0023-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch

b/http/firefox/patches/0023-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
deleted file mode 100644
index 06a2417..0000000
---
a/http/firefox/patches/0023-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff -Naur a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
---- a/build/moz.configure/lto-pgo.configure 2023-08-01 09:34:24.624120874
+0300
-+++ b/build/moz.configure/lto-pgo.configure 2023-08-01 09:42:14.109375611
+0300
-@@ -91,9 +91,9 @@
- def pgo_flags(compiler, profdata, target_is_windows, pgo_temporal):
- 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_cflags=["-fprofile-use", "-fprofile-correction",
"-Wno-coverage-mismatch"],
- use_ldflags=["-fprofile-use"],
- )
-
-@@ -105,7 +105,7 @@
- else:
- gen_ldflags = ["-fprofile-generate"]
-
-- gen_cflags = [prefix + "-fprofile-generate"]
-+ gen_cflags = [prefix + "-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"]
- if pgo_temporal:
- gen_cflags += ["-mllvm", "-pgo-temporal-instrumentation"]
-
-diff -Naur a/build/pgo/profileserver.py b/build/pgo/profileserver.py
---- a/build/pgo/profileserver.py 2023-08-01 09:34:24.630120978 +0300
-+++ b/build/pgo/profileserver.py 2023-08-01 09:47:01.544871568 +0300
-@@ -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,10 @@
- print("Firefox exited successfully, but produced a crashreport")
- sys.exit(1)
-
-+ 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 -Naur a/toolkit/components/terminator/nsTerminator.cpp
b/toolkit/components/terminator/nsTerminator.cpp
---- a/toolkit/components/terminator/nsTerminator.cpp 2023-08-01
09:34:19.635034175 +0300
-+++ b/toolkit/components/terminator/nsTerminator.cpp 2023-08-01
09:43:37.076062984 +0300
-@@ -460,6 +460,13 @@
- }
- #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());
- // crashAfterTicks is guaranteed to be > 0 as
- // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
diff --git a/http/firefox/patches/0024-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0024-bgo-908297-ppc64-webrtc.patch
deleted file mode 100644
index 14e8c4a..0000000
--- a/http/firefox/patches/0024-bgo-908297-ppc64-webrtc.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/0024-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0024-bmo-1516803-gcc-lto-sandbox.patch
new file mode 100644
index 0000000..eff08f6
--- /dev/null
+++ b/http/firefox/patches/0024-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/0025-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0025-bmo-1516803-gcc-lto-sandbox.patch
deleted file mode 100644
index eff08f6..0000000
--- a/http/firefox/patches/0025-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/0025-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0025-enable-vaapi-on-all-amd-cards.patch
new file mode 100644
index 0000000..112cd42
--- /dev/null
+++ b/http/firefox/patches/0025-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/0026-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0026-bgo-907963-rustflags-single-string.patch
new file mode 100644
index 0000000..a56aec4
--- /dev/null
+++ b/http/firefox/patches/0026-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)
diff --git a/http/firefox/patches/0026-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0026-enable-vaapi-on-all-amd-cards.patch
deleted file mode 100644
index 112cd42..0000000
--- a/http/firefox/patches/0026-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/0027-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0027-bgo-907963-rustflags-single-string.patch
deleted file mode 100644
index a56aec4..0000000
--- a/http/firefox/patches/0027-bgo-907963-rustflags-single-string.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- 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)
diff --git
a/http/firefox/patches/0027-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch

b/http/firefox/patches/0027-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
new file mode 100644
index 0000000..bb0621a
--- /dev/null
+++
b/http/firefox/patches/0027-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/0028-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch

b/http/firefox/patches/0028-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0028-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/0028-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch

b/http/firefox/patches/0028-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
new file mode 100644
index 0000000..4d5edb4
--- /dev/null
+++
b/http/firefox/patches/0028-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
@@ -0,0 +1,150 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla AT glandium.org>
+# Date 1690956771 0
+# Node ID b3c797d9f72325bd693c43ff9a1b110e6af964b2
+# Parent 7ee1dad073d03db2f730fd5c2baf77f37e458feb
+Bug 1844484 - Override the symbol used by compilers in vtables for pure
virtual methods. r=firefox-build-system-reviewers,ahochheiden
+
+In bug 1839743, we made the build system prefer packed relative
+relocations to elfhack when both the system libc and linker support
+them. Unfortunately, while that covers most of the benefits from
+elfhack, it doesn't cover bug 651892.
+
+To cover it, we make every C++ executable contain its own copy of
+the symbol, so that all relocations related to it become relative.
+
+And because this is actually (slightly) beneficial on macos, and because
+it's also an advantage to have our own abort called rather than the
+system's, we apply the same to all platforms.
+
+Differential Revision: https://phabricator.services.mozilla.com/D184068
+
+diff --git a/build/pure_virtual/moz.build b/build/pure_virtual/moz.build
+new file mode 100644
+--- /dev/null
++++ b/build/pure_virtual/moz.build
+@@ -0,0 +1,23 @@
++# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
++# vim: set filetype=python:
++# 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/.
++
++Library("pure_virtual")
++
++SOURCES += ["pure_virtual.c"]
++
++FORCE_STATIC_LIB = True
++
++USE_STATIC_LIBS = True
++
++# Build a real library so that the linker can remove it if the symbol
++# is never used.
++NO_EXPAND_LIBS = True
++
++# LTO can mess things up.
++if CONFIG["CC_TYPE"] == "clang-cl":
++ CFLAGS += ["-clang:-fno-lto"]
++else:
++ CFLAGS += ["-fno-lto"]
+diff --git a/build/pure_virtual/pure_virtual.c
b/build/pure_virtual/pure_virtual.c
+new file mode 100644
+--- /dev/null
++++ b/build/pure_virtual/pure_virtual.c
+@@ -0,0 +1,27 @@
++/* 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 <mozilla/Assertions.h>
++
++// This function is used in vtables to point at pure virtual methods.
++// The implementation in the standard library usually aborts, but
++// the function is normally never called (a call would be a bug).
++// Each of these entries in vtables, however, require an unnecessary
++// dynamic relocation. Defining our own function makes the linker
++// point the vtables here instead of the standard library, replacing
++// the dynamic relocations with relative relocations.
++//
++// On Windows, it doesn't really make a difference, but on macOS it
++// can be packed better, saving about 10KB in libxul, and on 64-bits
++// ELF systems, with packed relative relocations, it saves 140KB.
++//
++// Another advantage of having our own is that we can use MOZ_CRASH
++// instead of the system's abort.
++#ifdef _MSC_VER
++int __cdecl _purecall() { MOZ_CRASH("pure virtual call"); }
++#else
++__attribute__((visibility("hidden"))) void __cxa_pure_virtual() {
++ MOZ_CRASH("pure virtual call");
++}
++#endif
+diff --git a/mfbt/moz.build b/mfbt/moz.build
+--- a/mfbt/moz.build
++++ b/mfbt/moz.build
+@@ -200,8 +200,13 @@ SOURCES += [
+ SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
+
+ DisableStlWrapping()
+
+ if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
+ OS_LIBS += ["atomic"]
+
+ DEFINES["LZ4LIB_VISIBILITY"] = ""
++
++# This is kind of gross because this is not a subdirectory,
++# but pure_virtual requires mfbt to build and some projects
++# don't use mfbt.
++DIRS += ["../build/pure_virtual"]
+diff --git a/python/mozbuild/mozbuild/frontend/emitter.py
b/python/mozbuild/mozbuild/frontend/emitter.py
+--- a/python/mozbuild/mozbuild/frontend/emitter.py
++++ b/python/mozbuild/mozbuild/frontend/emitter.py
+@@ -383,16 +383,18 @@ class TreeMetadataEmitter(LoggingMixin):
+ if (
+ context.config.substs.get("MOZ_STDCXX_COMPAT")
+ and context.config.substs.get(self.ARCH_VAR.get(obj.KIND))
== "Linux"
+ ):
+ self._link_library(
+ context, obj, variable, self.STDCXXCOMPAT_NAME[obj.KIND]
+ )
+ if obj.KIND == "target":
++ if "pure_virtual" in self._libs:
++ self._link_library(context, obj, variable,
"pure_virtual")
+ for lib in context.config.substs.get("STLPORT_LIBS", []):
+ obj.link_system_library(lib)
+
+ def _link_library(self, context, obj, variable, path):
+ force_static = path.startswith("static:") and obj.KIND == "target"
+ if force_static:
+ path = path[7:]
+ name = mozpath.basename(path)
+diff --git a/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
b/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
+--- a/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
++++ b/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
+@@ -1,24 +1,16 @@
+ add_task(async function run_test() {
+ if (!("@mozilla.org/toolkit/crash-reporter;1" in Cc)) {
+ dump(
+ "INFO | test_crash_purevirtual.js | Can't test crashreporter in a
non-libxul build.\n"
+ );
+ return;
+ }
+
+- var isOSX = "nsILocalFileMac" in Ci;
+- if (isOSX) {
+- dump(
+- "INFO | test_crash_purevirtual.js | TODO: purecalls not caught on OS
X\n"
+- );
+- return;
+- }
+-
+ // Try crashing with a pure virtual call
+ await do_crash(
+ function () {
+ crashType = CrashTestUtils.CRASH_PURE_VIRTUAL_CALL;
+ crashReporter.annotateCrashReport("TestKey", "TestValue");
+ },
+ function (mdump, extra) {
+ Assert.equal(extra.TestKey, "TestValue");
+
diff --git a/http/firefox/patches/0029-bgo-911679-gcc-binutils-2.41.patch
b/http/firefox/patches/0029-bgo-911679-gcc-binutils-2.41.patch
new file mode 100644
index 0000000..9f8ce30
--- /dev/null
+++ b/http/firefox/patches/0029-bgo-911679-gcc-binutils-2.41.patch
@@ -0,0 +1,60 @@
+--- a/media/ffvpx/libavcodec/x86/mathops.h
++++ b/media/ffvpx/libavcodec/x86/mathops.h
+@@ -35,12 +35,20 @@
+ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
+ {
+ int rt, dummy;
++ if (__builtin_constant_p(shift))
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
++ :"a"(a), "rm"(b), "i"(shift & 0x1F)
+ );
++ else
++ __asm__ (
++ "imull %3 \n\t"
++ "shrdl %4, %%edx, %%eax \n\t"
++ :"=a"(rt), "=d"(dummy)
++ :"a"(a), "rm"(b), "c"((uint8_t)shift)
++ );
+ return rt;
+ }
+
+@@ -113,19 +121,31 @@ __asm__ volatile(\
+ // avoid +32 for shift optimization (gcc should do that ...)
+ #define NEG_SSR32 NEG_SSR32
+ static inline int32_t NEG_SSR32( int32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("sarl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+
+ #define NEG_USR32 NEG_USR32
+ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("shrl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+
+--
+2.30.2
diff --git
a/http/firefox/patches/0029-bmo-1841377-musl-libc-overalignment.patch
b/http/firefox/patches/0029-bmo-1841377-musl-libc-overalignment.patch
deleted file mode 100644
index 8711d32..0000000
--- a/http/firefox/patches/0029-bmo-1841377-musl-libc-overalignment.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-
-# HG changeset patch
-# User Xi Ruoyao <xry111 AT xry111.site>
-# Date 1689069778 0
-# Node ID f6a610679661486ccd236a445cfb9862e21a36dd
-# Parent e4dbb1e6c72201d69477e5686de0cead6e063ca1
-Bug 1841040 - Remove over-alignment from GCMarker and Nursery,
r=spidermonkey-reviewers,jonco
-
-js_new<T> cannot guarantee the alignment if T is over-aligned, and this
-issue is not trivial to fix (blocked by Bug 1842582).
-
-Add a static assert to detect the attempt using js_new<T> for
-over-aligned T, and remove the problematic alignas() attributes as a
-short-term fix.
-
-Differential Revision: https://phabricator.services.mozilla.com/D182546
-
-diff --git a/js/public/Utility.h b/js/public/Utility.h
---- a/js/public/Utility.h
-+++ b/js/public/Utility.h
-@@ -473,32 +473,38 @@ static inline void js_free(void* p) {
- * JS_DECLARE_NEW_METHODS (see js::MallocProvider for an example).
- *
- * Note: Do not add a ; at the end of a use of JS_DECLARE_NEW_METHODS,
- * or the build will break.
- */
- #define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS)
\
- template <class T, typename... Args>
\
- QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) {
\
-+ static_assert(
\
-+ alignof(T) <= alignof(max_align_t),
\
-+ "over-aligned type is not supported by JS_DECLARE_NEW_METHODS");
\
- void* memory = ALLOCATOR(sizeof(T));
\
- return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...)
\
- : nullptr;
\
- }
-
- /*
- * Given a class which should provide a 'new' method that takes an arena as
- * its first argument, add JS_DECLARE_NEW_ARENA_METHODS
- * (see js::MallocProvider for an example).
- *
- * Note: Do not add a ; at the end of a use of JS_DECLARE_NEW_ARENA_METHODS,
- * or the build will break.
- */
- #define JS_DECLARE_NEW_ARENA_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS)
\
- template <class T, typename... Args>
\
- QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(arena_id_t arena, Args&&...
args) { \
-+ static_assert(
\
-+ alignof(T) <= alignof(max_align_t),
\
-+ "over-aligned type is not supported by
JS_DECLARE_NEW_ARENA_METHODS"); \
- void* memory = ALLOCATOR(arena, sizeof(T));
\
- return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...)
\
- : nullptr;
\
- }
-
- /*
- * Given a class which should provide 'make' methods, add
- * JS_DECLARE_MAKE_METHODS (see js::MallocProvider for an example). This
-diff --git a/js/src/gc/GCMarker.h b/js/src/gc/GCMarker.h
---- a/js/src/gc/GCMarker.h
-+++ b/js/src/gc/GCMarker.h
-@@ -269,17 +269,17 @@ using ParallelMarkingTracer = MarkingTra
-
- enum ShouldReportMarkTime : bool {
- ReportMarkTime = true,
- DontReportMarkTime = false
- };
-
- } /* namespace gc */
-
--class alignas(TypicalCacheLineSize) GCMarker {
-+class GCMarker {
- enum MarkingState : uint8_t {
- // Have not yet started marking.
- NotActive,
-
- // Root marking mode. This sets the hasMarkedCells flag on compartments
- // containing objects and scripts, which is used to make sure we clean
up
- // dead compartments.
- RootMarking,
-diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h
---- a/js/src/gc/Nursery.h
-+++ b/js/src/gc/Nursery.h
-@@ -63,17 +63,17 @@ class JS_PUBLIC_API Sprinter;
-
- namespace gc {
- class AutoGCSession;
- struct Cell;
- class GCSchedulingTunables;
- class TenuringTracer;
- } // namespace gc
-
--class alignas(TypicalCacheLineSize) Nursery {
-+class Nursery {
- public:
- explicit Nursery(gc::GCRuntime* gc);
- ~Nursery();
-
- [[nodiscard]] bool init(AutoLockGCBgAlloc& lock);
-
- // Number of allocated (ready to use) chunks.
- unsigned allocatedChunkCount() const { return chunks_.length(); }
-
diff --git
a/http/firefox/patches/0030-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch

b/http/firefox/patches/0030-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
new file mode 100644
index 0000000..4a61c39
--- /dev/null
+++
b/http/firefox/patches/0030-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
@@ -0,0 +1,105 @@
+
+# HG changeset patch
+# User stransky <stransky AT redhat.com>
+# Date 1690834111 0
+# Node ID dd8ef46f522442182dcefcf0b8e1baa1a56d2cd0
+# Parent ed02af11f3cf62eb5935caa7bc132274c8a2cb5e
+Bug 1839615 [Linux] Configure libva logging according to platform decoder
log r=alwu
+
+Differential Revision: https://phabricator.services.mozilla.com/D184948
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+@@ -264,16 +264,27 @@ bool FFmpegVideoDecoder<LIBAV_VER>::Crea
+ return false;
+ }
+
+ mCodecContext->hw_device_ctx = mLib->av_buffer_ref(mVAAPIDeviceContext);
+ releaseVAAPIcontext.release();
+ return true;
+ }
+
++void FFmpegVideoDecoder<LIBAV_VER>::AdjustHWDecodeLogging() {
++ if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
++ mLib->av_log_set_level(AV_LOG_DEBUG);
++ setenv("LIBVA_MESSAGING_LEVEL", "1", false);
++ } else if (MOZ_LOG_TEST(sPDMLog, LogLevel::Info)) {
++ setenv("LIBVA_MESSAGING_LEVEL", "2", false);
++ } else {
++ setenv("LIBVA_MESSAGING_LEVEL", "0", false);
++ }
++}
++
+ MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() {
+ FFMPEG_LOG("Initialising VA-API FFmpeg decoder");
+
+ StaticMutexAutoLock mon(sMutex);
+
+ // mAcceleratedFormats is already configured so check supported
+ // formats before we do anything.
+ if (mAcceleratedFormats.Length()) {
+@@ -340,19 +351,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
+ mAcceleratedFormats = GetAcceleratedFormats();
+ if (!IsFormatAccelerated(mCodecID)) {
+ FFMPEG_LOG(" Format %s is not accelerated",
+ mLib->avcodec_get_name(mCodecID));
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+ }
+
+- if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
+- mLib->av_log_set_level(AV_LOG_DEBUG);
+- }
++ AdjustHWDecodeLogging();
+
+ FFMPEG_LOG(" VA-API FFmpeg init successful");
+ releaseVAAPIdecoder.release();
+ return NS_OK;
+ }
+
+ MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitV4L2Decoder() {
+ FFMPEG_LOG("Initialising V4L2-DRM FFmpeg decoder");
+@@ -420,19 +429,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
+ if (mAcceleratedFormats.IsEmpty()) {
+ // FFmpeg does not correctly report that the V4L2 wrapper decoders are
+ // hardware accelerated, but we know they always are. If we've gotten
+ // this far then we know this codec has a V4L2 wrapper decoder and so is
+ // accelerateed.
+ mAcceleratedFormats.AppendElement(mCodecID);
+ }
+
+- if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
+- mLib->av_log_set_level(AV_LOG_DEBUG);
+- }
++ AdjustHWDecodeLogging();
+
+ FFMPEG_LOG(" V4L2 FFmpeg init successful");
+ mUsingV4L2 = true;
+ releaseDecoder.release();
+ return NS_OK;
+ }
+ #endif
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+@@ -135,16 +135,17 @@ class FFmpegVideoDecoder<LIBAV_VER>
+ AVCodecID aCodecID, AVVAAPIHWConfig* hwconfig);
+ nsTArray<AVCodecID> GetAcceleratedFormats();
+ bool IsFormatAccelerated(AVCodecID aCodecID) const;
+
+ MediaResult CreateImageVAAPI(int64_t aOffset, int64_t aPts, int64_t
aDuration,
+ MediaDataDecoder::DecodedData& aResults);
+ MediaResult CreateImageV4L2(int64_t aOffset, int64_t aPts, int64_t
aDuration,
+ MediaDataDecoder::DecodedData& aResults);
++ void AdjustHWDecodeLogging();
+ #endif
+
+ #ifdef MOZ_WAYLAND_USE_HWDECODE
+ AVBufferRef* mVAAPIDeviceContext;
+ bool mUsingV4L2;
+ bool mEnableHardwareDecoding;
+ VADisplay mDisplay;
+ UniquePtr<VideoFramePool<LIBAV_VER>> mVideoFramePool;
+
diff --git
a/http/firefox/patches/0030-bmo-1847190-dont-use-configure_cache-for-relative-relocations.patch

b/http/firefox/patches/0030-bmo-1847190-dont-use-configure_cache-for-relative-relocations.patch
deleted file mode 100644
index e95d909..0000000
---
a/http/firefox/patches/0030-bmo-1847190-dont-use-configure_cache-for-relative-relocations.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naur a/build/moz.configure/util.configure
b/build/moz.configure/util.configure
---- a/build/moz.configure/util.configure 2023-08-07 09:25:05.036606566
-0000
-+++ b/build/moz.configure/util.configure 2023-08-07 11:16:45.797899734
-0000
-@@ -217,9 +217,9 @@
- ):
- compiler_path = compiler[0]
- compiler = wrapper + compiler
-- use_cache = True
-+ use_cache = configure_cache is not None
-
-- if compiler_path not in configure_cache.version_checked_compilers:
-+ if use_cache and compiler_path not in
configure_cache.version_checked_compilers:
- try:
- version_info = subprocess.check_output(
- [compiler_path, "--version"],
-diff -Naur a/toolkit/moz.configure b/toolkit/moz.configure
---- a/toolkit/moz.configure 2023-08-07 09:25:00.818403536 -0000
-+++ b/toolkit/moz.configure 2023-08-07 11:17:44.794947991 -0000
-@@ -1618,7 +1618,6 @@
- extra_toolchain_flags,
- linker_ldflags,
- readelf,
-- configure_cache,
- when=may_use_pack_relative_relocs,
- )
- @checking("for -z pack-relative-relocs option to ld", bool)
-@@ -1631,7 +1630,6 @@
- extra_toolchain_flags,
- linker_ldflags,
- readelf,
-- configure_cache,
- ):
- try:
- fd, path = mkstemp(prefix="conftest.")
-@@ -1640,7 +1638,7 @@
- pack_rel_relocs = ["-Wl,-z,pack-relative-relocs"]
- if (
- try_invoke_compiler(
-- configure_cache,
-+ None,
- [c_compiler.compiler] + c_compiler.flags,
- c_compiler.language,
- "int main() { return 0; }",
diff --git
a/http/firefox/patches/0031-bmo-1841567-stop-running-check_binary-on-host-binaries.patch

b/http/firefox/patches/0031-bmo-1841567-stop-running-check_binary-on-host-binaries.patch
deleted file mode 100644
index 0c6c69a..0000000
---
a/http/firefox/patches/0031-bmo-1841567-stop-running-check_binary-on-host-binaries.patch
+++ /dev/null
@@ -1,431 +0,0 @@
-
-# HG changeset patch
-# User Mike Hommey <mh+mozilla AT glandium.org>
-# Date 1688543450 0
-# Node ID aec57c7faed9d7639d7e1fbd936a8b38bc747e63
-# Parent 38b13df05dd40dab0cd1eaba4f7248de589d99e8
-Bug 1841567 - Stop running check_binary on host binaries.
r=firefox-build-system-reviewers,sergesanspaille
-
-Back when this was added, we weren't using sysroots, and we did end up
-with host binaries that couldn't run on the host because libstdc++ came
-along the host compiler, and was newer than the system libstdc++. These
-concerns are long gone (libstdc++ in the sysroots is older than any
-supported linux host build system), so we don't need to run those checks
-anymore.
-
-Differential Revision: https://phabricator.services.mozilla.com/D182691
-
-diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
---- a/config/makefiles/rust.mk
-+++ b/config/makefiles/rust.mk
-@@ -442,17 +442,17 @@ RUST_LIBRARY_DEPS := $(wordlist 2, 10000
- # the chance of proxy bypasses originating from rust code.
- # The check only works when rust code is built with -Clto but without
MOZ_LTO_RUST_CROSS.
- # Sanitizers and sancov also fail because compiler-rt hooks network
functions.
- ifndef MOZ_PROFILE_GENERATE
- ifeq ($(OS_ARCH), Linux)
- ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
- ifndef MOZ_LTO_RUST_CROSS
- ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
-- $(call py_action,check_binary,--target --networking $@)
-+ $(call py_action,check_binary,--networking $@)
- endif
- endif
- endif
- endif
- endif
-
- define make_default_rule
- $(1):
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -417,17 +417,17 @@ endef
- # creates OBJS, links with LIBS to create Foo
- #
- $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(call
resfile,$(PROGRAM)) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
- $(REPORT_BUILD)
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- $(LINKER) -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib
$(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS)
$(filter %.res,$^) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
- else # !WINNT || GNU_CC
- $(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS)
$(PGO_CFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS)
$(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
-- $(call py_action,check_binary,--target $@)
-+ $(call py_action,check_binary,$@)
- endif # WINNT && !GNU_CC
-
- ifdef ENABLE_STRIP
- $(STRIP) $(STRIP_FLAGS) $@
- endif
- ifdef MOZ_POST_PROGRAM_COMMAND
- $(MOZ_POST_PROGRAM_COMMAND) $@
- endif
-@@ -438,19 +438,16 @@ ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
- $(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS)
$(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS)
$(HOST_EXTRA_LIBS)
- else
- ifeq ($(HOST_CPP_PROG_LINK),1)
- $(HOST_CXX) -o $@ $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $($(notdir
$@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- else
- $(HOST_CC) -o $@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $($(notdir
$@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- endif # HOST_CPP_PROG_LINK
- endif
--ifndef CROSS_COMPILE
-- $(call py_action,check_binary,--host $@)
--endif
-
- #
- # This is an attempt to support generation of multiple binaries
- # in one directory, it assumes everything to compile Foo is in
- # Foo.o (from either Foo.c or Foo.cpp).
- #
- # SIMPLE_PROGRAMS = Foo Bar
- # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
-@@ -461,17 +458,17 @@ endef
- $(foreach p,$(SIMPLE_PROGRAMS),$(eval $(call simple_program_deps,$(p))))
-
- $(SIMPLE_PROGRAMS):
- $(REPORT_BUILD)
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- $(LINKER) -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(filter %.res,$^)
$(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS)
$(SHARED_LIBS) $(OS_LIBS)
- else
- $(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o
$@ $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS)
$(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
-- $(call py_action,check_binary,--target $@)
-+ $(call py_action,check_binary,$@)
- endif # WINNT && !GNU_CC
-
- ifdef ENABLE_STRIP
- $(STRIP) $(STRIP_FLAGS) $@
- endif
- ifdef MOZ_POST_PROGRAM_COMMAND
- $(MOZ_POST_PROGRAM_COMMAND) $@
- endif
-@@ -482,19 +479,16 @@ ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
- $(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS)
$(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS)
$(HOST_EXTRA_LIBS)
- else
- ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
- $(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS)
$($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- else
- $(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS)
$($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- endif
- endif
--ifndef CROSS_COMPILE
-- $(call py_action,check_binary,--host $@)
--endif
-
- $(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- $(REPORT_BUILD)
- $(RM) $(REAL_LIBRARY)
- $(AR) $(AR_FLAGS) $($@_OBJS)
-
- $(WASM_ARCHIVE): $(CWASMOBJS) $(CPPWASMOBJS) $(STATIC_LIBS) $(EXTRA_DEPS)
$(GLOBAL_DEPS)
- $(REPORT_BUILD_VERBOSE)
-@@ -525,17 +519,17 @@ endif
- # so instead of deleting .o files after repacking them into a dylib, we make
- # symlinks back to the originals. The symlinks are a no-op for stabs
debugging,
- # so no need to conditionalize on OS version or debugging format.
-
- $(SHARED_LIBRARY): $(OBJS) $(call resfile,$(SHARED_LIBRARY)) $(STATIC_LIBS)
$(EXTRA_DEPS) $(GLOBAL_DEPS)
- $(REPORT_BUILD)
- $(RM) $@
- $(MKSHLIB) $($@_OBJS) $(filter %.res,$^) $(LDFLAGS) $(STATIC_LIBS)
$(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
-- $(call py_action,check_binary,--target $@)
-+ $(call py_action,check_binary,$@)
-
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- endif # WINNT && !GCC
- chmod +x $@
- ifdef ENABLE_STRIP
- $(STRIP) $(STRIP_FLAGS) $@
- endif
-
-diff --git a/python/mozbuild/mozbuild/action/check_binary.py
b/python/mozbuild/mozbuild/action/check_binary.py
---- a/python/mozbuild/mozbuild/action/check_binary.py
-+++ b/python/mozbuild/mozbuild/action/check_binary.py
-@@ -15,22 +15,18 @@ from packaging.version import Version
- from mozbuild.action.util import log_build_task
- from mozbuild.util import memoize
-
- STDCXX_MAX_VERSION = Version("3.4.19")
- CXXABI_MAX_VERSION = Version("1.3.7")
- GLIBC_MAX_VERSION = Version("2.17")
- LIBGCC_MAX_VERSION = Version("4.8")
-
--HOST = {"platform": buildconfig.substs["HOST_OS_ARCH"], "readelf":
"readelf"}
--
--TARGET = {
-- "platform": buildconfig.substs["OS_TARGET"],
-- "readelf": buildconfig.substs.get("READELF", "readelf"),
--}
-+PLATFORM = buildconfig.substs["OS_TARGET"]
-+READELF = buildconfig.substs.get("READELF", "readelf")
-
- ADDR_RE = re.compile(r"[0-9a-f]{8,16}")
-
- if buildconfig.substs.get("HAVE_64BIT_BUILD"):
- GUESSED_NSMODULE_SIZE = 8
- else:
- GUESSED_NSMODULE_SIZE = 4
-
-@@ -58,24 +54,24 @@ def at_least_one(iter):
- for item in iter:
- saw_one = True
- yield item
- if not saw_one:
- raise Empty()
-
-
- # Iterates the symbol table on ELF binaries.
--def iter_elf_symbols(target, binary, all=False):
-+def iter_elf_symbols(binary, all=False):
- ty = get_type(binary)
- # Static libraries are ar archives. Assume they are ELF.
- if ty == UNKNOWN and open(binary, "rb").read(8) == b"!<arch>\n":
- ty = ELF
- assert ty == ELF
- for line in get_output(
-- target["readelf"], "--wide", "--syms" if all else "--dyn-syms",
binary
-+ READELF, "--wide", "--syms" if all else "--dyn-syms", binary
- ):
- data = line.split()
- if not (len(data) >= 8 and data[0].endswith(":") and
data[0][:-1].isdigit()):
- continue
- n, addr, size, type, bind, vis, index, name = data[:8]
-
- if "@" in name:
- name, ver = name.rsplit("@", 1)
-@@ -88,36 +84,36 @@ def iter_elf_symbols(target, binary, all
- # readelf output may contain decimal values or hexadecimal
- # values prefixed with 0x for the size. Let python autodetect.
- "size": int(size, 0),
- "name": name,
- "version": ver,
- }
-
-
--def iter_readelf_dynamic(target, binary):
-- for line in get_output(target["readelf"], "-d", binary):
-+def iter_readelf_dynamic(binary):
-+ for line in get_output(READELF, "-d", binary):
- data = line.split(None, 2)
- if data and len(data) == 3 and data[0].startswith("0x"):
- yield data[1].rstrip(")").lstrip("("), data[2]
-
-
--def check_binary_compat(target, binary):
-+def check_binary_compat(binary):
- if get_type(binary) != ELF:
- raise Skip()
- checks = (
- ("libstdc++", "GLIBCXX_", STDCXX_MAX_VERSION),
- ("libstdc++", "CXXABI_", CXXABI_MAX_VERSION),
- ("libgcc", "GCC_", LIBGCC_MAX_VERSION),
- ("libc", "GLIBC_", GLIBC_MAX_VERSION),
- )
-
- unwanted = {}
- try:
-- for sym in at_least_one(iter_elf_symbols(target, binary)):
-+ for sym in at_least_one(iter_elf_symbols(binary)):
- # Only check versions on undefined symbols
- if sym["addr"] != 0:
- continue
-
- # No version to check
- if not sym["version"]:
- continue
-
-@@ -136,21 +132,21 @@ def check_binary_compat(target, binary):
- "We do not want these {} symbol versions to be
used:".format(lib)
- )
- error.extend(
- " {} ({})".format(s["name"], s["version"]) for s in
unwanted[prefix]
- )
- raise RuntimeError("\n".join(error))
-
-
--def check_textrel(target, binary):
-- if target is HOST or get_type(binary) != ELF:
-+def check_textrel(binary):
-+ if get_type(binary) != ELF:
- raise Skip()
- try:
-- for tag, value in at_least_one(iter_readelf_dynamic(target,
binary)):
-+ for tag, value in at_least_one(iter_readelf_dynamic(binary)):
- if tag == "TEXTREL" or (tag == "FLAGS" and "TEXTREL" in value):
- raise RuntimeError(
- "We do not want text relocations in libraries and
programs"
- )
- except Empty:
- raise RuntimeError("Could not parse readelf output?")
-
-
-@@ -162,54 +158,52 @@ def ishex(s):
- return False
-
-
- def is_libxul(binary):
- basename = os.path.basename(binary).lower()
- return "xul" in basename
-
-
--def check_pt_load(target, binary):
-- if target is HOST or get_type(binary) != ELF or not is_libxul(binary):
-+def check_pt_load(binary):
-+ if get_type(binary) != ELF or not is_libxul(binary):
- raise Skip()
- count = 0
-- for line in get_output(target["readelf"], "-l", binary):
-+ for line in get_output(READELF, "-l", binary):
- data = line.split()
- if data and data[0] == "LOAD":
- count += 1
- if count <= 1:
- raise RuntimeError("Expected more than one PT_LOAD segment")
-
-
--def check_mozglue_order(target, binary):
-- if target is HOST or target["platform"] != "Android":
-+def check_mozglue_order(binary):
-+ if PLATFORM != "Android":
- raise Skip()
- # While this is very unlikely (libc being added by the compiler at the
end
- # of the linker command line), if libmozglue.so ends up after libc.so,
all
- # hell breaks loose, so better safe than sorry, and check it's actually
the
- # case.
- try:
- mozglue = libc = None
-- for n, (tag, value) in enumerate(
-- at_least_one(iter_readelf_dynamic(target, binary))
-- ):
-+ for n, (tag, value) in
enumerate(at_least_one(iter_readelf_dynamic(binary))):
- if tag == "NEEDED":
- if "[libmozglue.so]" in value:
- mozglue = n
- elif "[libc.so]" in value:
- libc = n
- if libc is None:
- raise RuntimeError("libc.so is not linked?")
- if mozglue is not None and libc < mozglue:
- raise RuntimeError("libmozglue.so must be linked before
libc.so")
- except Empty:
- raise RuntimeError("Could not parse readelf output?")
-
-
--def check_networking(target, binary):
-+def check_networking(binary):
- retcode = 0
- networking_functions = set(
- [
- # socketpair is not concerning; it is restricted to AF_UNIX
- "connect",
- "accept",
- "listen",
- "getsockname",
-@@ -237,17 +231,17 @@ def check_networking(target, binary):
- "getprotobynumber",
- "setprotoent",
- "endprotoent",
- ]
- )
- bad_occurences_names = set()
-
- try:
-- for sym in at_least_one(iter_elf_symbols(target, binary, all=True)):
-+ for sym in at_least_one(iter_elf_symbols(binary, all=True)):
- if sym["addr"] == 0 and sym["name"] in networking_functions:
- bad_occurences_names.add(sym["name"])
- except Empty:
- raise RuntimeError("Could not parse llvm-objdump output?")
-
- basename = os.path.basename(binary)
- if bad_occurences_names:
- s = (
-@@ -263,37 +257,37 @@ def check_networking(target, binary):
- file=sys.stderr,
- )
- retcode = 1
- elif buildconfig.substs.get("MOZ_AUTOMATION"):
- print("TEST-PASS | check_networking | {}".format(basename))
- return retcode
-
-
--def checks(target, binary):
-+def checks(binary):
- # The clang-plugin is built as target but is really a host binary.
-- # Cheat and pretend we were passed the right argument.
-+ # Cheat and pretend we weren't called.
- if "clang-plugin" in binary:
-- target = HOST
-+ return 0
- checks = []
-- if buildconfig.substs.get("MOZ_STDCXX_COMPAT") and target["platform"]
== "Linux":
-+ if buildconfig.substs.get("MOZ_STDCXX_COMPAT") and PLATFORM == "Linux":
- checks.append(check_binary_compat)
-
- # Disabled for local builds because of readelf performance: See bug
1472496
- if not buildconfig.substs.get("DEVELOPER_OPTIONS"):
- checks.append(check_textrel)
- checks.append(check_pt_load)
- checks.append(check_mozglue_order)
-
- retcode = 0
- basename = os.path.basename(binary)
- for c in checks:
- try:
- name = c.__name__
-- c(target, binary)
-+ c(binary)
- if buildconfig.substs.get("MOZ_AUTOMATION"):
- print("TEST-PASS | {} | {}".format(name, basename))
- except Skip:
- pass
- except RuntimeError as e:
- print(
- "TEST-UNEXPECTED-FAIL | {} | {} | {}".format(name,
basename, str(e)),
- file=sys.stderr,
-@@ -301,43 +295,26 @@ def checks(target, binary):
- retcode = 1
- return retcode
-
-
- def main(args):
- parser = argparse.ArgumentParser(description="Check built binaries")
-
- parser.add_argument(
-- "--host", action="store_true", help="Perform checks for a host
binary"
-- )
-- parser.add_argument(
-- "--target", action="store_true", help="Perform checks for a target
binary"
-- )
-- parser.add_argument(
- "--networking",
- action="store_true",
- help="Perform checks for networking functions",
- )
-
- parser.add_argument(
- "binary", metavar="PATH", help="Location of the binary to check"
- )
-
- options = parser.parse_args(args)
-
-- if options.host == options.target:
-- print("Exactly one of --host or --target must be given",
file=sys.stderr)
-- return 1
--
-- if options.networking and options.host:
-- print("--networking is only valid with --target", file=sys.stderr)
-- return 1
--
- if options.networking:
-- return check_networking(TARGET, options.binary)
-- elif options.host:
-- return checks(HOST, options.binary)
-- elif options.target:
-- return checks(TARGET, options.binary)
-+ return check_networking(options.binary)
-+ return checks(options.binary)
-
-
- if __name__ == "__main__":
- sys.exit(log_build_task(main, sys.argv[1:]))
-
diff --git
a/http/firefox/patches/0031-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch

b/http/firefox/patches/0031-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
new file mode 100644
index 0000000..49bd785
--- /dev/null
+++
b/http/firefox/patches/0031-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
@@ -0,0 +1,451 @@
+
+# HG changeset patch
+# User stransky <stransky AT redhat.com>
+# Date 1691134608 0
+# Node ID 4fb5d7fb05768e517a9de0310aad97dc60eb9142
+# Parent a0da46a5cddd1f88b3f35948704fe311a910d44e
+Bug 1846701 [Linux] Rename MOZ_WAYLAND_USE_HWDECODE to MOZ_USE_HWDECODE as
we build HW decode on X11 too r=alwu
+
+Differential Revision: https://phabricator.services.mozilla.com/D185140
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegLibs.h
b/dom/media/platforms/ffmpeg/FFmpegLibs.h
+--- a/dom/media/platforms/ffmpeg/FFmpegLibs.h
++++ b/dom/media/platforms/ffmpeg/FFmpegLibs.h
+@@ -9,17 +9,17 @@
+
+ extern "C" {
+ #ifdef __GNUC__
+ # pragma GCC visibility push(default)
+ #endif
+ #include "libavcodec/avcodec.h"
+ #include "libavutil/avutil.h"
+ #include "libavutil/mem.h"
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ # include "libavutil/hwcontext_vaapi.h"
+ # include "libavutil/hwcontext_drm.h"
+ #endif
+ #ifdef __GNUC__
+ # pragma GCC visibility pop
+ #endif
+ }
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+@@ -14,17 +14,17 @@
+ #include "VPXDecoder.h"
+ #include "mozilla/layers/KnowsCompositor.h"
+ #if LIBAVCODEC_VERSION_MAJOR >= 57
+ # include "mozilla/layers/TextureClient.h"
+ #endif
+ #if LIBAVCODEC_VERSION_MAJOR >= 58
+ # include "mozilla/ProfilerMarkers.h"
+ #endif
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ # include "H264.h"
+ # include "mozilla/gfx/gfxVars.h"
+ # include "mozilla/layers/DMABUFSurfaceImage.h"
+ # include "mozilla/widget/DMABufLibWrapper.h"
+ # include "FFmpegVideoFramePool.h"
+ # include "va/va.h"
+ #endif
+
+@@ -58,17 +58,17 @@
+ #include "prsystem.h"
+
+ #ifdef XP_WIN
+ # include "mozilla/gfx/DeviceManagerDx.h"
+ # include "mozilla/gfx/gfxVars.h"
+ #endif
+
+ // Forward declare from va.h
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ typedef int VAStatus;
+ # define VA_EXPORT_SURFACE_READ_ONLY 0x0001
+ # define VA_EXPORT_SURFACE_SEPARATE_LAYERS 0x0004
+ # define VA_STATUS_SUCCESS 0x00000000
+ #endif
+ // Use some extra HW frames for potential rendering lags.
+ #define EXTRA_HW_FRAMES 6
+ // Defines number of delayed frames until we switch back to SW decode.
+@@ -80,17 +80,17 @@ typedef int VAStatus;
+
+ #define AV_LOG_DEBUG 48
+
+ typedef mozilla::layers::Image Image;
+ typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage;
+
+ namespace mozilla {
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ nsTArray<AVCodecID> FFmpegVideoDecoder<LIBAV_VER>::mAcceleratedFormats;
+ #endif
+
+ using media::TimeUnit;
+
+ /**
+ * FFmpeg calls back to this function with a list of pixel formats it
supports.
+ * We choose a pixel format that we support and return it.
+@@ -141,17 +141,17 @@ static AVPixelFormat ChoosePixelFormat(A
+ break;
+ }
+ }
+
+ NS_WARNING("FFmpeg does not share any supported pixel formats.");
+ return AV_PIX_FMT_NONE;
+ }
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ static AVPixelFormat ChooseVAAPIPixelFormat(AVCodecContext* aCodecContext,
+ const AVPixelFormat* aFormats) {
+ FFMPEG_LOG("Choosing FFmpeg pixel format for VA-API video decoding.");
+ for (; *aFormats > -1; aFormats++) {
+ switch (*aFormats) {
+ case AV_PIX_FMT_VAAPI_VLD:
+ FFMPEG_LOG("Requesting pixel format VAAPI_VLD");
+ return AV_PIX_FMT_VAAPI_VLD;
+@@ -472,17 +472,17 @@ int64_t FFmpegVideoDecoder<LIBAV_VER>::P
+
+ void FFmpegVideoDecoder<LIBAV_VER>::PtsCorrectionContext::Reset() {
+ mNumFaultyPts = 0;
+ mNumFaultyDts = 0;
+ mLastPts = INT64_MIN;
+ mLastDts = INT64_MIN;
+ }
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ void FFmpegVideoDecoder<LIBAV_VER>::InitHWDecodingPrefs() {
+ if (!mEnableHardwareDecoding) {
+ FFMPEG_LOG("VAAPI is disabled by parent decoder module.");
+ return;
+ }
+
+ bool supported = false;
+ switch (mCodecID) {
+@@ -524,17 +524,17 @@ void FFmpegVideoDecoder<LIBAV_VER>::Init
+ #endif
+
+ FFmpegVideoDecoder<LIBAV_VER>::FFmpegVideoDecoder(
+ FFmpegLibWrapper* aLib, const VideoInfo& aConfig,
+ KnowsCompositor* aAllocator, ImageContainer* aImageContainer,
+ bool aLowLatency, bool aDisableHardwareDecoding,
+ Maybe<TrackingId> aTrackingId)
+ : FFmpegDataDecoder(aLib, GetCodecId(aConfig.mMimeType)),
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ mVAAPIDeviceContext(nullptr),
+ mUsingV4L2(false),
+ mEnableHardwareDecoding(!aDisableHardwareDecoding),
+ mDisplay(nullptr),
+ #endif
+ mImageAllocator(aAllocator),
+ mImageContainer(aImageContainer),
+ mInfo(aConfig),
+@@ -547,32 +547,32 @@ FFmpegVideoDecoder<LIBAV_VER>::FFmpegVid
+ mLowLatency(aLowLatency),
+ mTrackingId(std::move(aTrackingId)) {
+ FFMPEG_LOG("FFmpegVideoDecoder::FFmpegVideoDecoder MIME %s Codec ID %d",
+ aConfig.mMimeType.get(), mCodecID);
+ // Use a new MediaByteBuffer as the object will be modified during
+ // initialization.
+ mExtraData = new MediaByteBuffer;
+ mExtraData->AppendElements(*aConfig.mExtraData);
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ InitHWDecodingPrefs();
+ #endif
+ }
+
+ FFmpegVideoDecoder<LIBAV_VER>::~FFmpegVideoDecoder() {
+ #ifdef CUSTOMIZED_BUFFER_ALLOCATION
+ MOZ_DIAGNOSTIC_ASSERT(mAllocatedImages.IsEmpty(),
+ "Should release all shmem buffers before destroy!");
+ #endif
+ }
+
+ RefPtr<MediaDataDecoder::InitPromise> FFmpegVideoDecoder<LIBAV_VER>::Init()
{
+ MediaResult rv;
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ if (mEnableHardwareDecoding) {
+ # ifdef MOZ_ENABLE_VAAPI
+ rv = InitVAAPIDecoder();
+ if (NS_SUCCEEDED(rv)) {
+ return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack,
__func__);
+ }
+ # endif // MOZ_ENABLE_VAAPI
+
+@@ -581,17 +581,17 @@ RefPtr<MediaDataDecoder::InitPromise> FF
+ rv = InitV4L2Decoder();
+ if (NS_SUCCEEDED(rv)) {
+ return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack,
__func__);
+ }
+ # endif // MOZ_ENABLE_V4L2
+
+ mEnableHardwareDecoding = false;
+ }
+-#endif // MOZ_WAYLAND_USE_HWDECODE
++#endif // MOZ_USE_HWDECODE
+
+ rv = InitDecoder();
+ if (NS_SUCCEEDED(rv)) {
+ return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
+ }
+
+ return InitPromise::CreateAndReject(rv, __func__);
+ }
+@@ -946,17 +946,17 @@ void FFmpegVideoDecoder<LIBAV_VER>::Init
+ nsCString FFmpegVideoDecoder<LIBAV_VER>::GetCodecName() const {
+ #if LIBAVCODEC_VERSION_MAJOR > 53
+ return nsCString(mLib->avcodec_descriptor_get(mCodecID)->name);
+ #else
+ return nsLiteralCString("FFmpegAudioDecoder");
+ #endif
+ }
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ void FFmpegVideoDecoder<LIBAV_VER>::InitHWCodecContext(bool aUsingV4L2) {
+ mCodecContext->width = mInfo.mImage.width;
+ mCodecContext->height = mInfo.mImage.height;
+ mCodecContext->thread_count = 1;
+
+ if (aUsingV4L2) {
+ mCodecContext->get_format = ChooseV4L2PixelFormat;
+ } else {
+@@ -1083,17 +1083,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
+ *aGotFrame = false;
+ }
+ do {
+ if (!PrepareFrame()) {
+ NS_WARNING("FFmpeg decoder failed to allocate frame.");
+ return MediaResult(NS_ERROR_OUT_OF_MEMORY, __func__);
+ }
+
+-# ifdef MOZ_WAYLAND_USE_HWDECODE
++# ifdef MOZ_USE_HWDECODE
+ // Release unused VA-API surfaces before avcodec_receive_frame() as
+ // ffmpeg recycles VASurface for HW decoding.
+ if (mVideoFramePool) {
+ mVideoFramePool->ReleaseUnusedVAAPIFrames();
+ }
+ # endif
+
+ res = mLib->avcodec_receive_frame(mCodecContext, mFrame);
+@@ -1112,17 +1112,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
+ NS_ERROR_DOM_MEDIA_DECODE_ERR,
+ RESULT_DETAIL("avcodec_receive_frame error: %s", errStr));
+ }
+
+ UpdateDecodeTimes(decodeStart);
+ decodeStart = TimeStamp::Now();
+
+ MediaResult rv;
+-# ifdef MOZ_WAYLAND_USE_HWDECODE
++# ifdef MOZ_USE_HWDECODE
+ if (IsHardwareAccelerated()) {
+ if (mMissedDecodeInAverangeTime > HW_DECODE_LATE_FRAMES) {
+ PROFILER_MARKER_TEXT("FFmpegVideoDecoder::DoDecode",
MEDIA_PLAYBACK, {},
+ "Fallback to SW decode");
+ FFMPEG_LOG(" HW decoding is slow, switch back to SW decode");
+ return MediaResult(
+ NS_ERROR_DOM_MEDIA_DECODE_ERR,
+ RESULT_DETAIL("HW decoding is slow, switch back to SW decode"));
+@@ -1448,17 +1448,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
+ if (!v) {
+ return MediaResult(NS_ERROR_OUT_OF_MEMORY,
+ RESULT_DETAIL("image allocation error"));
+ }
+ aResults.AppendElement(std::move(v));
+ return NS_OK;
+ }
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ bool FFmpegVideoDecoder<LIBAV_VER>::GetVAAPISurfaceDescriptor(
+ VADRMPRIMESurfaceDescriptor* aVaDesc) {
+ VASurfaceID surface_id = (VASurfaceID)(uintptr_t)mFrame->data[3];
+ VAStatus vas = mLib->vaExportSurfaceHandle(
+ mDisplay, surface_id, VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2,
+ VA_EXPORT_SURFACE_READ_ONLY | VA_EXPORT_SURFACE_SEPARATE_LAYERS,
aVaDesc);
+ if (vas != VA_STATUS_SUCCESS) {
+ return false;
+@@ -1604,35 +1604,35 @@ AVCodecID FFmpegVideoDecoder<LIBAV_VER>:
+ }
+ #endif
+
+ return AV_CODEC_ID_NONE;
+ }
+
+ void FFmpegVideoDecoder<LIBAV_VER>::ProcessShutdown() {
+ MOZ_ASSERT(mTaskQueue->IsOnCurrentThread());
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ mVideoFramePool = nullptr;
+ if (IsHardwareAccelerated()) {
+ mLib->av_buffer_unref(&mVAAPIDeviceContext);
+ }
+ #endif
+ FFmpegDataDecoder<LIBAV_VER>::ProcessShutdown();
+ }
+
+ bool FFmpegVideoDecoder<LIBAV_VER>::IsHardwareAccelerated(
+ nsACString& aFailureReason) const {
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ return mUsingV4L2 || !!mVAAPIDeviceContext;
+ #else
+ return false;
+ #endif
+ }
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ bool FFmpegVideoDecoder<LIBAV_VER>::IsFormatAccelerated(
+ AVCodecID aCodecID) const {
+ for (const auto& format : mAcceleratedFormats) {
+ if (format == aCodecID) {
+ return true;
+ }
+ }
+ return false;
+diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+@@ -12,17 +12,17 @@
+ #include "FFmpegLibWrapper.h"
+ #include "PerformanceRecorder.h"
+ #include "SimpleMap.h"
+ #include "mozilla/ScopeExit.h"
+ #include "nsTHashSet.h"
+ #if LIBAVCODEC_VERSION_MAJOR >= 57 && LIBAVUTIL_VERSION_MAJOR >= 56
+ # include "mozilla/layers/TextureClient.h"
+ #endif
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ # include "FFmpegVideoFramePool.h"
+ #endif
+
+ struct _VADRMPRIMESurfaceDescriptor;
+ typedef struct _VADRMPRIMESurfaceDescriptor VADRMPRIMESurfaceDescriptor;
+
+ namespace mozilla {
+
+@@ -118,17 +118,17 @@ class FFmpegVideoDecoder<LIBAV_VER>
+ layers::TextureClient* AllocateTextureClientForImage(
+ struct AVCodecContext* aCodecContext, layers::PlanarYCbCrImage*
aImage);
+
+ gfx::IntSize GetAlignmentVideoFrameSize(struct AVCodecContext*
aCodecContext,
+ int32_t aWidth,
+ int32_t aHeight) const;
+ #endif
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ void InitHWDecodingPrefs();
+ MediaResult InitVAAPIDecoder();
+ MediaResult InitV4L2Decoder();
+ bool CreateVAAPIDeviceContext();
+ void InitHWCodecContext(bool aUsingV4L2);
+ AVCodec* FindVAAPICodec();
+ bool GetVAAPISurfaceDescriptor(VADRMPRIMESurfaceDescriptor* aVaDesc);
+ void AddAcceleratedFormats(nsTArray<AVCodecID>& aCodecList,
+@@ -138,17 +138,17 @@ class FFmpegVideoDecoder<LIBAV_VER>
+
+ MediaResult CreateImageVAAPI(int64_t aOffset, int64_t aPts, int64_t
aDuration,
+ MediaDataDecoder::DecodedData& aResults);
+ MediaResult CreateImageV4L2(int64_t aOffset, int64_t aPts, int64_t
aDuration,
+ MediaDataDecoder::DecodedData& aResults);
+ void AdjustHWDecodeLogging();
+ #endif
+
+-#ifdef MOZ_WAYLAND_USE_HWDECODE
++#ifdef MOZ_USE_HWDECODE
+ AVBufferRef* mVAAPIDeviceContext;
+ bool mUsingV4L2;
+ bool mEnableHardwareDecoding;
+ VADisplay mDisplay;
+ UniquePtr<VideoFramePool<LIBAV_VER>> mVideoFramePool;
+ static nsTArray<AVCodecID> mAcceleratedFormats;
+ #endif
+ RefPtr<KnowsCompositor> mImageAllocator;
+diff --git a/dom/media/platforms/ffmpeg/ffmpeg58/moz.build
b/dom/media/platforms/ffmpeg/ffmpeg58/moz.build
+--- a/dom/media/platforms/ffmpeg/ffmpeg58/moz.build
++++ b/dom/media/platforms/ffmpeg/ffmpeg58/moz.build
+@@ -27,13 +27,13 @@ if CONFIG['CC_TYPE'] == 'gcc':
+ '-Wno-attributes',
+ ]
+ if CONFIG['MOZ_WIDGET_GTK']:
+ CXXFLAGS += CONFIG['MOZ_GTK3_CFLAGS']
+ if CONFIG['MOZ_ENABLE_VAAPI'] or CONFIG['MOZ_ENABLE_V4L2']:
+ UNIFIED_SOURCES += ['../FFmpegVideoFramePool.cpp']
+ LOCAL_INCLUDES += ['/third_party/drm/drm/include/libdrm/']
+ USE_LIBS += ['mozva']
+- DEFINES['MOZ_WAYLAND_USE_HWDECODE'] = 1
++ DEFINES['MOZ_USE_HWDECODE'] = 1
+
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+ FINAL_LIBRARY = 'xul'
+diff --git a/dom/media/platforms/ffmpeg/ffmpeg59/moz.build
b/dom/media/platforms/ffmpeg/ffmpeg59/moz.build
+--- a/dom/media/platforms/ffmpeg/ffmpeg59/moz.build
++++ b/dom/media/platforms/ffmpeg/ffmpeg59/moz.build
+@@ -27,13 +27,13 @@ if CONFIG["CC_TYPE"] == "gcc":
+ "-Wno-attributes",
+ ]
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
+ if CONFIG["MOZ_ENABLE_VAAPI"] or CONFIG["MOZ_ENABLE_V4L2"]:
+ UNIFIED_SOURCES += ["../FFmpegVideoFramePool.cpp"]
+ LOCAL_INCLUDES += ["/third_party/drm/drm/include/libdrm/"]
+ USE_LIBS += ["mozva"]
+- DEFINES["MOZ_WAYLAND_USE_HWDECODE"] = 1
++ DEFINES["MOZ_USE_HWDECODE"] = 1
+
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+ FINAL_LIBRARY = "xul"
+diff --git a/dom/media/platforms/ffmpeg/ffmpeg60/moz.build
b/dom/media/platforms/ffmpeg/ffmpeg60/moz.build
+--- a/dom/media/platforms/ffmpeg/ffmpeg60/moz.build
++++ b/dom/media/platforms/ffmpeg/ffmpeg60/moz.build
+@@ -27,13 +27,13 @@ if CONFIG["CC_TYPE"] == "gcc":
+ "-Wno-attributes",
+ ]
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
+ if CONFIG["MOZ_ENABLE_VAAPI"] or CONFIG["MOZ_ENABLE_V4L2"]:
+ UNIFIED_SOURCES += ["../FFmpegVideoFramePool.cpp"]
+ LOCAL_INCLUDES += ["/third_party/drm/drm/include/libdrm/"]
+ USE_LIBS += ["mozva"]
+- DEFINES["MOZ_WAYLAND_USE_HWDECODE"] = 1
++ DEFINES["MOZ_USE_HWDECODE"] = 1
+
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+ FINAL_LIBRARY = "xul"
+diff --git a/dom/media/platforms/ffmpeg/ffvpx/moz.build
b/dom/media/platforms/ffmpeg/ffvpx/moz.build
+--- a/dom/media/platforms/ffmpeg/ffvpx/moz.build
++++ b/dom/media/platforms/ffmpeg/ffvpx/moz.build
+@@ -38,13 +38,13 @@ DEFINES["FFVPX_VERSION"] = 46465650
+ DEFINES["USING_MOZFFVPX"] = True
+
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
+ if CONFIG["MOZ_ENABLE_VAAPI"] or CONFIG["MOZ_ENABLE_V4L2"]:
+ UNIFIED_SOURCES += ["../FFmpegVideoFramePool.cpp"]
+ LOCAL_INCLUDES += ["/third_party/drm/drm/include/libdrm/"]
+ USE_LIBS += ["mozva"]
+- DEFINES["MOZ_WAYLAND_USE_HWDECODE"] = 1
++ DEFINES["MOZ_USE_HWDECODE"] = 1
+
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+ FINAL_LIBRARY = "xul"
+
diff --git
a/http/firefox/patches/0032-bmo-1841571-treat-rust-libraries-as-objects.patch
b/http/firefox/patches/0032-bmo-1841571-treat-rust-libraries-as-objects.patch
deleted file mode 100644
index 00cadde..0000000
---
a/http/firefox/patches/0032-bmo-1841571-treat-rust-libraries-as-objects.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-
-# HG changeset patch
-# User Mike Hommey <mh+mozilla AT glandium.org>
-# Date 1688455805 0
-# Node ID 8f3c18688bf43961a61f78f11f8aaef5e5de5fec
-# Parent 25c1a2b1eff10640f2c23261214875b0c13c9037
-Bug 1841571 - Treat rust libraries as objects in the build graph.
r=firefox-build-system-reviewers,sergesanspaille
-
-The build graph has dependencies like:
- some/dir/target: some/dir/target-objects
-
-where some/dir/target-objects will build the objects in the directory,
-and some/dir/target will link some binary (executable or shared library)
-using those objects (and/or objects in other directories).
-
-From that perspective, the rust (static) libraries are more similar to
-objects, and we should treat them as such.
-
-This will allow to add the right dependencies to use a in-tree-built tool
-to link shared libraries without having building the rust libraries
-depend on it just because they are treated as other binaries in the
-build graph.
-
-Differential Revision: https://phabricator.services.mozilla.com/D182694
-
-diff --git a/config/recurse.mk b/config/recurse.mk
---- a/config/recurse.mk
-+++ b/config/recurse.mk
-@@ -230,12 +230,12 @@ ifndef TEST_MOZBUILD
- pre-export:: $(DEPTH)/.cargo/config
- endif
-
- # When building gtest as part of the build (LINK_GTEST_DURING_COMPILE),
- # force the build system to get to it first, so that it can be linked
- # quickly without LTO, allowing the build system to go ahead with
- # plain gkrust and libxul while libxul-gtest is being linked and
- # dump-sym'ed.
--ifneq (,$(filter toolkit/library/gtest/rust/target,$(compile_targets)))
--toolkit/library/rust/target: toolkit/library/gtest/rust/target
-+ifneq (,$(filter
toolkit/library/gtest/rust/target-objects,$(compile_targets)))
-+toolkit/library/rust/target-objects:
toolkit/library/gtest/rust/target-objects
- endif
- endif
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -381,28 +381,28 @@ else
- resfile =
- resfile_for_manifest =
- endif
-
- ##############################################
- ifdef COMPILE_ENVIRONMENT
- compile:: host target
-
--host:: $(HOST_OBJS) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
$(HOST_RUST_PROGRAMS) $(HOST_RUST_LIBRARY_FILE) $(HOST_SHARED_LIBRARY)
-+host:: $(HOST_OBJS) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
$(HOST_RUST_PROGRAMS) $(HOST_SHARED_LIBRARY)
-
--target:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(LIBRARY)
$(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_LIBRARY_FILE)
$(RUST_PROGRAMS))
-+target:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(LIBRARY)
$(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_PROGRAMS))
-
- ifndef LIBRARY
- ifdef OBJS
- target:: $(OBJS)
- endif
- endif
-
--target-objects: $(OBJS) $(PROGOBJS)
--host-objects: $(HOST_OBJS) $(HOST_PROGOBJS)
-+target-objects: $(OBJS) $(PROGOBJS) $(filter-out
$(MOZBUILD_NON_DEFAULT_TARGETS),$(RUST_LIBRARY_FILE))
-+host-objects: $(HOST_OBJS) $(HOST_PROGOBJS) $(HOST_RUST_LIBRARY_FILE)
-
- syms::
-
- include $(MOZILLA_DIR)/config/makefiles/target_binaries.mk
- endif
-
- alltags:
- $(RM) TAGS
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py
b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1379,16 +1379,18 @@ class RecursiveMakeBackend(MakeBackend):
- self._process_non_default_target(libdef, libdef.import_name,
backend_file)
-
- def _process_host_shared_library(self, libdef, backend_file):
- backend_file.write("HOST_SHARED_LIBRARY = %s\n" % libdef.lib_name)
-
- def _build_target_for_obj(self, obj):
- if hasattr(obj, "output_category") and obj.output_category:
- target_name = obj.output_category
-+ elif isinstance(obj, BaseRustLibrary):
-+ target_name = f"{obj.KIND}-objects"
- else:
- target_name = obj.KIND
- if target_name == "wasm":
- target_name = "target"
- return "%s/%s" % (
- mozpath.relpath(obj.objdir, self.environment.topobjdir),
- target_name,
- )
-
diff --git
a/http/firefox/patches/0033-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch

b/http/firefox/patches/0033-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
deleted file mode 100644
index 4d5edb4..0000000
---
a/http/firefox/patches/0033-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-
-# HG changeset patch
-# User Mike Hommey <mh+mozilla AT glandium.org>
-# Date 1690956771 0
-# Node ID b3c797d9f72325bd693c43ff9a1b110e6af964b2
-# Parent 7ee1dad073d03db2f730fd5c2baf77f37e458feb
-Bug 1844484 - Override the symbol used by compilers in vtables for pure
virtual methods. r=firefox-build-system-reviewers,ahochheiden
-
-In bug 1839743, we made the build system prefer packed relative
-relocations to elfhack when both the system libc and linker support
-them. Unfortunately, while that covers most of the benefits from
-elfhack, it doesn't cover bug 651892.
-
-To cover it, we make every C++ executable contain its own copy of
-the symbol, so that all relocations related to it become relative.
-
-And because this is actually (slightly) beneficial on macos, and because
-it's also an advantage to have our own abort called rather than the
-system's, we apply the same to all platforms.
-
-Differential Revision: https://phabricator.services.mozilla.com/D184068
-
-diff --git a/build/pure_virtual/moz.build b/build/pure_virtual/moz.build
-new file mode 100644
---- /dev/null
-+++ b/build/pure_virtual/moz.build
-@@ -0,0 +1,23 @@
-+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-+# vim: set filetype=python:
-+# 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/.
-+
-+Library("pure_virtual")
-+
-+SOURCES += ["pure_virtual.c"]
-+
-+FORCE_STATIC_LIB = True
-+
-+USE_STATIC_LIBS = True
-+
-+# Build a real library so that the linker can remove it if the symbol
-+# is never used.
-+NO_EXPAND_LIBS = True
-+
-+# LTO can mess things up.
-+if CONFIG["CC_TYPE"] == "clang-cl":
-+ CFLAGS += ["-clang:-fno-lto"]
-+else:
-+ CFLAGS += ["-fno-lto"]
-diff --git a/build/pure_virtual/pure_virtual.c
b/build/pure_virtual/pure_virtual.c
-new file mode 100644
---- /dev/null
-+++ b/build/pure_virtual/pure_virtual.c
-@@ -0,0 +1,27 @@
-+/* 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 <mozilla/Assertions.h>
-+
-+// This function is used in vtables to point at pure virtual methods.
-+// The implementation in the standard library usually aborts, but
-+// the function is normally never called (a call would be a bug).
-+// Each of these entries in vtables, however, require an unnecessary
-+// dynamic relocation. Defining our own function makes the linker
-+// point the vtables here instead of the standard library, replacing
-+// the dynamic relocations with relative relocations.
-+//
-+// On Windows, it doesn't really make a difference, but on macOS it
-+// can be packed better, saving about 10KB in libxul, and on 64-bits
-+// ELF systems, with packed relative relocations, it saves 140KB.
-+//
-+// Another advantage of having our own is that we can use MOZ_CRASH
-+// instead of the system's abort.
-+#ifdef _MSC_VER
-+int __cdecl _purecall() { MOZ_CRASH("pure virtual call"); }
-+#else
-+__attribute__((visibility("hidden"))) void __cxa_pure_virtual() {
-+ MOZ_CRASH("pure virtual call");
-+}
-+#endif
-diff --git a/mfbt/moz.build b/mfbt/moz.build
---- a/mfbt/moz.build
-+++ b/mfbt/moz.build
-@@ -200,8 +200,13 @@ SOURCES += [
- SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
-
- DisableStlWrapping()
-
- if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
- OS_LIBS += ["atomic"]
-
- DEFINES["LZ4LIB_VISIBILITY"] = ""
-+
-+# This is kind of gross because this is not a subdirectory,
-+# but pure_virtual requires mfbt to build and some projects
-+# don't use mfbt.
-+DIRS += ["../build/pure_virtual"]
-diff --git a/python/mozbuild/mozbuild/frontend/emitter.py
b/python/mozbuild/mozbuild/frontend/emitter.py
---- a/python/mozbuild/mozbuild/frontend/emitter.py
-+++ b/python/mozbuild/mozbuild/frontend/emitter.py
-@@ -383,16 +383,18 @@ class TreeMetadataEmitter(LoggingMixin):
- if (
- context.config.substs.get("MOZ_STDCXX_COMPAT")
- and context.config.substs.get(self.ARCH_VAR.get(obj.KIND))
== "Linux"
- ):
- self._link_library(
- context, obj, variable, self.STDCXXCOMPAT_NAME[obj.KIND]
- )
- if obj.KIND == "target":
-+ if "pure_virtual" in self._libs:
-+ self._link_library(context, obj, variable,
"pure_virtual")
- for lib in context.config.substs.get("STLPORT_LIBS", []):
- obj.link_system_library(lib)
-
- def _link_library(self, context, obj, variable, path):
- force_static = path.startswith("static:") and obj.KIND == "target"
- if force_static:
- path = path[7:]
- name = mozpath.basename(path)
-diff --git a/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
b/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
---- a/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
-+++ b/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
-@@ -1,24 +1,16 @@
- add_task(async function run_test() {
- if (!("@mozilla.org/toolkit/crash-reporter;1" in Cc)) {
- dump(
- "INFO | test_crash_purevirtual.js | Can't test crashreporter in a
non-libxul build.\n"
- );
- return;
- }
-
-- var isOSX = "nsILocalFileMac" in Ci;
-- if (isOSX) {
-- dump(
-- "INFO | test_crash_purevirtual.js | TODO: purecalls not caught on OS
X\n"
-- );
-- return;
-- }
--
- // Try crashing with a pure virtual call
- await do_crash(
- function () {
- crashType = CrashTestUtils.CRASH_PURE_VIRTUAL_CALL;
- crashReporter.annotateCrashReport("TestKey", "TestValue");
- },
- function (mdump, extra) {
- Assert.equal(extra.TestKey, "TestValue");
-
diff --git a/http/firefox/patches/0034-bgo-911679-gcc-binutils-2.41.patch
b/http/firefox/patches/0034-bgo-911679-gcc-binutils-2.41.patch
deleted file mode 100644
index 9f8ce30..0000000
--- a/http/firefox/patches/0034-bgo-911679-gcc-binutils-2.41.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/media/ffvpx/libavcodec/x86/mathops.h
-+++ b/media/ffvpx/libavcodec/x86/mathops.h
-@@ -35,12 +35,20 @@
- static av_always_inline av_const int MULL(int a, int b, unsigned shift)
- {
- int rt, dummy;
-+ if (__builtin_constant_p(shift))
- __asm__ (
- "imull %3 \n\t"
- "shrdl %4, %%edx, %%eax \n\t"
- :"=a"(rt), "=d"(dummy)
-- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
-+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
- );
-+ else
-+ __asm__ (
-+ "imull %3 \n\t"
-+ "shrdl %4, %%edx, %%eax \n\t"
-+ :"=a"(rt), "=d"(dummy)
-+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
-+ );
- return rt;
- }
-
-@@ -113,19 +121,31 @@ __asm__ volatile(\
- // avoid +32 for shift optimization (gcc should do that ...)
- #define NEG_SSR32 NEG_SSR32
- static inline int32_t NEG_SSR32( int32_t a, int8_t s){
-+ if (__builtin_constant_p(s))
- __asm__ ("sarl %1, %0\n\t"
- : "+r" (a)
-- : "ic" ((uint8_t)(-s))
-+ : "i" (-s & 0x1F)
- );
-+ else
-+ __asm__ ("sarl %1, %0\n\t"
-+ : "+r" (a)
-+ : "c" ((uint8_t)(-s))
-+ );
- return a;
- }
-
- #define NEG_USR32 NEG_USR32
- static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
-+ if (__builtin_constant_p(s))
- __asm__ ("shrl %1, %0\n\t"
- : "+r" (a)
-- : "ic" ((uint8_t)(-s))
-+ : "i" (-s & 0x1F)
- );
-+ else
-+ __asm__ ("shrl %1, %0\n\t"
-+ : "+r" (a)
-+ : "c" ((uint8_t)(-s))
-+ );
- return a;
- }
-
---
-2.30.2
diff --git
a/http/firefox/patches/0035-bmo-1847697-dont-use-pack-relative-relocs-when-it-leads-to-ld-error.patch

b/http/firefox/patches/0035-bmo-1847697-dont-use-pack-relative-relocs-when-it-leads-to-ld-error.patch
deleted file mode 100644
index 6d16524..0000000
---
a/http/firefox/patches/0035-bmo-1847697-dont-use-pack-relative-relocs-when-it-leads-to-ld-error.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -1619,19 +1619,28 @@
- # BFD ld ignores options it doesn't understand. So check
- # that we did get packed relative relocations (DT_RELR).
- env = os.environ.copy()
- env["LANG"] = "C"
- dyn = check_cmd_output(readelf, "-d", path, env=env)
-+ dyn = dyn.splitlines()
- tags = [
-- int(l.split()[0], 16)
-- for l in dyn.splitlines()
-- if l.strip().startswith("0x")
-+ int(l.split()[0], 16) for l in dyn if
l.strip().startswith("0x")
- ]
- # Older versions of readelf don't know about DT_RELR but
will
- # still display the tag number.
- if 0x23 in tags:
-- return pack_rel_relocs
-+ needed = [l for l in dyn if l.split()[1] == "(NEEDED)"]
-+ is_glibc = any(l.endswith("[libc.so.6]") for l in
needed)
-+ # The mold linker doesn't add a GLIBC_ABI_DT_RELR
version
-+ # dependency, which ld.so doesn't like.
-+ #
https://github.com/rui314/mold/issues/653#issuecomment-1670274638
-+ if is_glibc:
-+ versions = check_cmd_output(readelf, "-V", path,
env=env)
-+ if "GLIBC_ABI_DT_RELR" in versions.split():
-+ return pack_rel_relocs
-+ else:
-+ return pack_rel_relocs
- finally:
- try:
- os.remove(path)
- except FileNotFoundError:
- pass
-
diff --git
a/http/firefox/patches/0036-bmo-1837627-dont-use-YUVColorSpaceIdentity-for-YUV-pixel-formats.patch

b/http/firefox/patches/0036-bmo-1837627-dont-use-YUVColorSpaceIdentity-for-YUV-pixel-formats.patch
deleted file mode 100644
index 8e18e04..0000000
---
a/http/firefox/patches/0036-bmo-1837627-dont-use-YUVColorSpaceIdentity-for-YUV-pixel-formats.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-
-# HG changeset patch
-# User stransky <stransky AT redhat.com>
-# Date 1690447248 0
-# Node ID 0963f5b18821bbcac2c9799552a6d60fc31ae7ae
-# Parent f3abc129a8e8c6554481b7a7c3e63c34df3c9ee3
-Bug 1837627 Don't use YUVColorSpace::Identity for YUV pixel formats r=alwu
-
-Check color space of video frames and use YUVColorSpace::Identity for RGB
frames only. This patch also unifies color space setup for shm and non-shm
video decoding paths.
-
-- Implement TransferAVColorSpaceToColorSpace() to convert color space from
AVColorSpace to gfx::YUVColorSpace.
- It also check color format and doesn't allow to mix YUV color space and
RGB formats.
-- Use TransferAVColorSpaceToColorSpace() in both shm and non-shm decoding
paths.
-
-Differential Revision: https://phabricator.services.mozilla.com/D184469
-
-diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
-+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
-@@ -607,16 +607,42 @@ static gfx::ColorDepth GetColorDepth(con
- return gfx::ColorDepth::COLOR_12;
- #endif
- default:
- MOZ_ASSERT_UNREACHABLE("Not supported format?");
- return gfx::ColorDepth::COLOR_8;
- }
- }
-
-+static bool IsYUVFormat(const AVPixelFormat& aFormat) {
-+ return aFormat != AV_PIX_FMT_GBRP;
-+}
-+
-+static gfx::YUVColorSpace TransferAVColorSpaceToColorSpace(
-+ const AVColorSpace aSpace, const AVPixelFormat aFormat,
-+ const gfx::IntSize& aSize) {
-+ if (!IsYUVFormat(aFormat)) {
-+ return gfx::YUVColorSpace::Identity;
-+ }
-+ switch (aSpace) {
-+#if LIBAVCODEC_VERSION_MAJOR >= 55
-+ case AVCOL_SPC_BT2020_NCL:
-+ case AVCOL_SPC_BT2020_CL:
-+ return gfx::YUVColorSpace::BT2020;
-+#endif
-+ case AVCOL_SPC_BT709:
-+ return gfx::YUVColorSpace::BT709;
-+ case AVCOL_SPC_SMPTE170M:
-+ case AVCOL_SPC_BT470BG:
-+ return gfx::YUVColorSpace::BT601;
-+ default:
-+ return DefaultColorSpace(aSize);
-+ }
-+}
-+
- #ifdef CUSTOMIZED_BUFFER_ALLOCATION
- static int GetVideoBufferWrapper(struct AVCodecContext* aCodecContext,
- AVFrame* aFrame, int aFlags) {
- auto* decoder =
- static_cast<FFmpegVideoDecoder<LIBAV_VER>*>(aCodecContext->opaque);
- int rv = decoder->GetVideoBuffer(aCodecContext, aFrame, aFlags);
- return rv < 0 ? decoder->GetVideoBufferDefault(aCodecContext, aFrame,
aFlags)
- : rv;
-@@ -625,32 +651,16 @@ static int GetVideoBufferWrapper(struct
- static void ReleaseVideoBufferWrapper(void* opaque, uint8_t* data) {
- if (opaque) {
- FFMPEG_LOGV("ReleaseVideoBufferWrapper: PlanarYCbCrImage=%p", opaque);
- RefPtr<ImageBufferWrapper> image =
static_cast<ImageBufferWrapper*>(opaque);
- image->ReleaseBuffer();
- }
- }
-
--static gfx::YUVColorSpace TransferAVColorSpaceToYUVColorSpace(
-- AVColorSpace aSpace) {
-- switch (aSpace) {
-- case AVCOL_SPC_BT2020_NCL:
-- case AVCOL_SPC_BT2020_CL:
-- return gfx::YUVColorSpace::BT2020;
-- case AVCOL_SPC_BT709:
-- return gfx::YUVColorSpace::BT709;
-- case AVCOL_SPC_SMPTE170M:
-- case AVCOL_SPC_BT470BG:
-- return gfx::YUVColorSpace::BT601;
-- default:
-- return gfx::YUVColorSpace::Default;
-- }
--}
--
- static bool IsColorFormatSupportedForUsingCustomizedBuffer(
- const AVPixelFormat& aFormat) {
- # if XP_WIN
- // Currently the web render doesn't support uploading R16 surface, so we
can't
- // use the shmem texture for 10 bit+ videos which would be uploaded by the
- // web render. See Bug 1751498.
- return aFormat == AV_PIX_FMT_YUV420P || aFormat == AV_PIX_FMT_YUVJ420P ||
- aFormat == AV_PIX_FMT_YUV444P;
-@@ -723,18 +733,19 @@ FFmpegVideoDecoder<LIBAV_VER>::AllocateT
-
- // Setting other attributes
- data.mPictureRect = gfx::IntRect(
- mInfo.ScaledImageRect(aCodecContext->width, aCodecContext->height)
- .TopLeft(),
- gfx::IntSize(aCodecContext->width, aCodecContext->height));
- data.mStereoMode = mInfo.mStereoMode;
- if (aCodecContext->colorspace != AVCOL_SPC_UNSPECIFIED) {
-- data.mYUVColorSpace =
-- TransferAVColorSpaceToYUVColorSpace(aCodecContext->colorspace);
-+ data.mYUVColorSpace = TransferAVColorSpaceToColorSpace(
-+ aCodecContext->colorspace, aCodecContext->pix_fmt,
-+ data.mPictureRect.Size());
- } else {
- data.mYUVColorSpace = mInfo.mColorSpace
- ? *mInfo.mColorSpace
- : DefaultColorSpace(data.mPictureRect.Size());
- }
- data.mColorDepth = GetColorDepth(aCodecContext->pix_fmt);
- data.mColorRange = aCodecContext->color_range == AVCOL_RANGE_JPEG
- ? gfx::ColorRange::FULL
-@@ -1275,40 +1286,27 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
- if (aGotFrame) {
- *aGotFrame = true;
- }
- return rv;
- #endif
- }
-
- gfx::YUVColorSpace FFmpegVideoDecoder<LIBAV_VER>::GetFrameColorSpace()
const {
-+ AVColorSpace colorSpace = AVCOL_SPC_UNSPECIFIED;
- #if LIBAVCODEC_VERSION_MAJOR > 58
-- switch (mFrame->colorspace) {
-+ colorSpace = mFrame->colorspace;
- #else
-- AVColorSpace colorSpace = AVCOL_SPC_UNSPECIFIED;
- if (mLib->av_frame_get_colorspace) {
- colorSpace = (AVColorSpace)mLib->av_frame_get_colorspace(mFrame);
- }
-- switch (colorSpace) {
- #endif
--#if LIBAVCODEC_VERSION_MAJOR >= 55
-- case AVCOL_SPC_BT2020_NCL:
-- case AVCOL_SPC_BT2020_CL:
-- return gfx::YUVColorSpace::BT2020;
--#endif
-- case AVCOL_SPC_BT709:
-- return gfx::YUVColorSpace::BT709;
-- case AVCOL_SPC_SMPTE170M:
-- case AVCOL_SPC_BT470BG:
-- return gfx::YUVColorSpace::BT601;
-- case AVCOL_SPC_RGB:
-- return gfx::YUVColorSpace::Identity;
-- default:
-- return DefaultColorSpace({mFrame->width, mFrame->height});
-- }
-+ return TransferAVColorSpaceToColorSpace(
-+ colorSpace, (AVPixelFormat)mFrame->format,
-+ gfx::IntSize{mFrame->width, mFrame->height});
- }
-
- gfx::ColorSpace2 FFmpegVideoDecoder<LIBAV_VER>::GetFrameColorPrimaries()
const {
- AVColorPrimaries colorPrimaries = AVCOL_PRI_UNSPECIFIED;
- #if LIBAVCODEC_VERSION_MAJOR > 57
- colorPrimaries = mFrame->color_primaries;
- #endif
- switch (colorPrimaries) {
-@@ -1632,17 +1630,18 @@ bool FFmpegVideoDecoder<LIBAV_VER>::IsFo
- }
-
- // See ffmpeg / vaapi_decode.c how CodecID is mapped to VAProfile.
- static const struct {
- enum AVCodecID codec_id;
- VAProfile va_profile;
- char name[100];
- } vaapi_profile_map[] = {
--# define MAP(c, v, n) {AV_CODEC_ID_##c, VAProfile##v, n}
-+# define MAP(c, v, n) \
-+ { AV_CODEC_ID_##c, VAProfile##v, n }
- MAP(H264, H264ConstrainedBaseline, "H264ConstrainedBaseline"),
- MAP(H264, H264Main, "H264Main"),
- MAP(H264, H264High, "H264High"),
- MAP(VP8, VP8Version0_3, "VP8Version0_3"),
- MAP(VP9, VP9Profile0, "VP9Profile0"),
- MAP(VP9, VP9Profile2, "VP9Profile2"),
- MAP(AV1, AV1Profile0, "AV1Profile0"),
- MAP(AV1, AV1Profile1, "AV1Profile1"),
-
diff --git
a/http/firefox/patches/0037-bmo-1837627-convert-AVColorRange-to-GetColorRange.patch

b/http/firefox/patches/0037-bmo-1837627-convert-AVColorRange-to-GetColorRange.patch
deleted file mode 100644
index 9aa822d..0000000
---
a/http/firefox/patches/0037-bmo-1837627-convert-AVColorRange-to-GetColorRange.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-
-# HG changeset patch
-# User stransky <stransky AT redhat.com>
-# Date 1690447248 0
-# Node ID b42bac6cd95acd03ec2418f6079f886e424081ab
-# Parent 0963f5b18821bbcac2c9799552a6d60fc31ae7ae
-Bug 1837627 Implement GetColorRange() to convert AVColorRange to
gfx::ColorRange r=alwu
-
-Depends on D184469
-
-Differential Revision: https://phabricator.services.mozilla.com/D184472
-
-diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
-+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
-@@ -584,16 +584,21 @@ RefPtr<MediaDataDecoder::InitPromise> FF
- rv = InitDecoder();
- if (NS_SUCCEEDED(rv)) {
- return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
- }
-
- return InitPromise::CreateAndReject(rv, __func__);
- }
-
-+static gfx::ColorRange GetColorRange(enum AVColorRange& aColorRange) {
-+ return aColorRange == AVCOL_RANGE_JPEG ? gfx::ColorRange::FULL
-+ : gfx::ColorRange::LIMITED;
-+}
-+
- static gfx::ColorDepth GetColorDepth(const AVPixelFormat& aFormat) {
- switch (aFormat) {
- case AV_PIX_FMT_YUV420P:
- case AV_PIX_FMT_YUVJ420P:
- case AV_PIX_FMT_YUV422P:
- case AV_PIX_FMT_YUV444P:
- return gfx::ColorDepth::COLOR_8;
- case AV_PIX_FMT_YUV420P10LE:
-@@ -742,19 +747,17 @@ FFmpegVideoDecoder<LIBAV_VER>::AllocateT
- aCodecContext->colorspace, aCodecContext->pix_fmt,
- data.mPictureRect.Size());
- } else {
- data.mYUVColorSpace = mInfo.mColorSpace
- ? *mInfo.mColorSpace
- : DefaultColorSpace(data.mPictureRect.Size());
- }
- data.mColorDepth = GetColorDepth(aCodecContext->pix_fmt);
-- data.mColorRange = aCodecContext->color_range == AVCOL_RANGE_JPEG
-- ? gfx::ColorRange::FULL
-- : gfx::ColorRange::LIMITED;
-+ data.mColorRange = GetColorRange(aCodecContext->color_range);
-
- FFMPEG_LOGV(
- "Created plane data, YSize=(%d, %d), CbCrSize=(%d, %d), "
- "CroppedYSize=(%d, %d), CroppedCbCrSize=(%d, %d), ColorDepth=%hhu",
- paddedYSize.Width(), paddedYSize.Height(), paddedCbCrSize.Width(),
- paddedCbCrSize.Height(), data.YPictureSize().Width(),
- data.YPictureSize().Height(), data.CbCrPictureSize().Width(),
- data.CbCrPictureSize().Height(),
static_cast<uint8_t>(data.mColorDepth));
-@@ -1325,18 +1328,17 @@ gfx::ColorRange FFmpegVideoDecoder<LIBAV
- AVColorRange range = AVCOL_RANGE_UNSPECIFIED;
- #if LIBAVCODEC_VERSION_MAJOR > 58
- range = mFrame->color_range;
- #else
- if (mLib->av_frame_get_color_range) {
- range = (AVColorRange)mLib->av_frame_get_color_range(mFrame);
- }
- #endif
-- return range == AVCOL_RANGE_JPEG ? gfx::ColorRange::FULL
-- : gfx::ColorRange::LIMITED;
-+ return GetColorRange(range);
- }
-
- MediaResult FFmpegVideoDecoder<LIBAV_VER>::CreateImage(
- int64_t aOffset, int64_t aPts, int64_t aDuration,
- MediaDataDecoder::DecodedData& aResults) const {
- FFMPEG_LOG("Got one frame output with pts=%" PRId64 " dts=%" PRId64
- " duration=%" PRId64 " opaque=%" PRId64,
- aPts, mFrame->pkt_dts, aDuration,
mCodecContext->reordered_opaque);
-
diff --git
a/http/firefox/patches/0038-bmo-1843425-enable-vaapi-on-X11-only-build.patch
b/http/firefox/patches/0038-bmo-1843425-enable-vaapi-on-X11-only-build.patch
deleted file mode 100644
index 27f8cef..0000000
---
a/http/firefox/patches/0038-bmo-1843425-enable-vaapi-on-X11-only-build.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# HG changeset patch
-# User stransky <stransky AT redhat.com>
-# Date 1689756118 0
-# Node ID cc17b92d0327a30ffb9a863533c0bfe48e72acdf
-# Parent 570c5180c6544a50abca263132c618e2f9180733
-Bug 1843425 [Linux] Probe HW decoding on X11 too r=emilio
-
-Differential Revision: https://phabricator.services.mozilla.com/D183858
-
-diff --git a/widget/gtk/GfxInfo.cpp b/widget/gtk/GfxInfo.cpp
---- a/widget/gtk/GfxInfo.cpp
-+++ b/widget/gtk/GfxInfo.cpp
-@@ -1284,24 +1284,21 @@ nsresult GfxInfo::GetFeatureStatusImpl(
- auto ret = GfxInfoBase::GetFeatureStatusImpl(
- aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId,
&os);
-
- // Probe VA-API/V4L2 on supported devices only
- if (aFeature == nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING) {
- if (!StaticPrefs::media_hardware_video_decoding_enabled_AtStartup()) {
- return ret;
- }
-- bool probeHWDecode = false;
--#ifdef MOZ_WAYLAND
-- probeHWDecode =
-+ bool probeHWDecode =
- mIsAccelerated &&
- (*aStatus == nsIGfxInfo::FEATURE_STATUS_OK ||
-
StaticPrefs::media_hardware_video_decoding_force_enabled_AtStartup() ||
- StaticPrefs::media_ffmpeg_vaapi_enabled_AtStartup());
--#endif
- if (probeHWDecode) {
- GetDataVAAPI();
- GetDataV4L2();
- } else {
- mIsVAAPISupported = Some(false);
- mIsV4L2Supported = Some(false);
- }
- if (!mIsVAAPISupported.value() && !mIsV4L2Supported.value()) {
-
diff --git
a/http/firefox/patches/0039-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch

b/http/firefox/patches/0039-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
deleted file mode 100644
index 4a61c39..0000000
---
a/http/firefox/patches/0039-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-
-# HG changeset patch
-# User stransky <stransky AT redhat.com>
-# Date 1690834111 0
-# Node ID dd8ef46f522442182dcefcf0b8e1baa1a56d2cd0
-# Parent ed02af11f3cf62eb5935caa7bc132274c8a2cb5e
-Bug 1839615 [Linux] Configure libva logging according to platform decoder
log r=alwu
-
-Differential Revision: https://phabricator.services.mozilla.com/D184948
-
-diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
-+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
-@@ -264,16 +264,27 @@ bool FFmpegVideoDecoder<LIBAV_VER>::Crea
- return false;
- }
-
- mCodecContext->hw_device_ctx = mLib->av_buffer_ref(mVAAPIDeviceContext);
- releaseVAAPIcontext.release();
- return true;
- }
-
-+void FFmpegVideoDecoder<LIBAV_VER>::AdjustHWDecodeLogging() {
-+ if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
-+ mLib->av_log_set_level(AV_LOG_DEBUG);
-+ setenv("LIBVA_MESSAGING_LEVEL", "1", false);
-+ } else if (MOZ_LOG_TEST(sPDMLog, LogLevel::Info)) {
-+ setenv("LIBVA_MESSAGING_LEVEL", "2", false);
-+ } else {
-+ setenv("LIBVA_MESSAGING_LEVEL", "0", false);
-+ }
-+}
-+
- MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() {
- FFMPEG_LOG("Initialising VA-API FFmpeg decoder");
-
- StaticMutexAutoLock mon(sMutex);
-
- // mAcceleratedFormats is already configured so check supported
- // formats before we do anything.
- if (mAcceleratedFormats.Length()) {
-@@ -340,19 +351,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
- mAcceleratedFormats = GetAcceleratedFormats();
- if (!IsFormatAccelerated(mCodecID)) {
- FFMPEG_LOG(" Format %s is not accelerated",
- mLib->avcodec_get_name(mCodecID));
- return NS_ERROR_NOT_AVAILABLE;
- }
- }
-
-- if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
-- mLib->av_log_set_level(AV_LOG_DEBUG);
-- }
-+ AdjustHWDecodeLogging();
-
- FFMPEG_LOG(" VA-API FFmpeg init successful");
- releaseVAAPIdecoder.release();
- return NS_OK;
- }
-
- MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitV4L2Decoder() {
- FFMPEG_LOG("Initialising V4L2-DRM FFmpeg decoder");
-@@ -420,19 +429,17 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
- if (mAcceleratedFormats.IsEmpty()) {
- // FFmpeg does not correctly report that the V4L2 wrapper decoders are
- // hardware accelerated, but we know they always are. If we've gotten
- // this far then we know this codec has a V4L2 wrapper decoder and so is
- // accelerateed.
- mAcceleratedFormats.AppendElement(mCodecID);
- }
-
-- if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
-- mLib->av_log_set_level(AV_LOG_DEBUG);
-- }
-+ AdjustHWDecodeLogging();
-
- FFMPEG_LOG(" V4L2 FFmpeg init successful");
- mUsingV4L2 = true;
- releaseDecoder.release();
- return NS_OK;
- }
- #endif
-
-diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
-+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
-@@ -135,16 +135,17 @@ class FFmpegVideoDecoder<LIBAV_VER>
- AVCodecID aCodecID, AVVAAPIHWConfig* hwconfig);
- nsTArray<AVCodecID> GetAcceleratedFormats();
- bool IsFormatAccelerated(AVCodecID aCodecID) const;
-
- MediaResult CreateImageVAAPI(int64_t aOffset, int64_t aPts, int64_t
aDuration,
- MediaDataDecoder::DecodedData& aResults);
- MediaResult CreateImageV4L2(int64_t aOffset, int64_t aPts, int64_t
aDuration,
- MediaDataDecoder::DecodedData& aResults);
-+ void AdjustHWDecodeLogging();
- #endif
-
- #ifdef MOZ_WAYLAND_USE_HWDECODE
- AVBufferRef* mVAAPIDeviceContext;
- bool mUsingV4L2;
- bool mEnableHardwareDecoding;
- VADisplay mDisplay;
- UniquePtr<VideoFramePool<LIBAV_VER>> mVideoFramePool;
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (cd83f7a98d81a31086a9ddde77dc4b4782ad391a), Pavel Vinogradov, 08/29/2023

Archive powered by MHonArc 2.6.24.

Top of Page