sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (458373d1b047a8c7ced069b266899e69539b131e)
- 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 (458373d1b047a8c7ced069b266899e69539b131e)
- Date: Sat, 9 Sep 2023 18:00:36 +0000
GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:
http/firefox/HISTORY
| 3
http/firefox/patches/0012-Make-PGO-use-toolchain.patch
| 33
http/firefox/patches/0012-build-Disable-Werror.patch
| 24
http/firefox/patches/0013-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34
http/firefox/patches/0013-build-Disable-Werror.patch
| 24
http/firefox/patches/0014-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23
http/firefox/patches/0014-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34
http/firefox/patches/0015-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23
http/firefox/patches/0015-bgo-816975-fix-build-on-x86.patch
| 16
http/firefox/patches/0016-bgo-816975-fix-build-on-x86.patch
| 16
http/firefox/patches/0016-bmo-1559213-fix-system-av1-libs.patch
| 22
http/firefox/patches/0017-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
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-1754469-memory_mozalloc_throw.patch
| 69 +
http/firefox/patches/0019-bgo-860033-firefox-wayland-no-dbus.patch
| 49 +
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-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 +
http/firefox/patches/0021-bgo-908297-ppc64-webrtc.patch
| 30
http/firefox/patches/0021-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 -
http/firefox/patches/0022-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0022-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
| 98 --
http/firefox/patches/0023-bgo-908297-ppc64-webrtc.patch
| 35
http/firefox/patches/0023-enable-vaapi-on-all-amd-cards.patch
| 19
http/firefox/patches/0024-bgo-907963-rustflags-single-string.patch
| 76 +
http/firefox/patches/0024-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0025-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20
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-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
| 150 +++
http/firefox/patches/0027-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20
http/firefox/patches/0027-bgo-911679-gcc-binutils-2.41.patch
| 60 +
http/firefox/patches/0028-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
| 105 ++
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-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
| 451 ++++++++++
http/firefox/patches/0030-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
| 105 --
http/firefox/patches/0030-bmo-1849869-update-proc-macro2-to-1.0.66.patch
| 127 ++
http/firefox/patches/0031-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
| 451 ----------
http/firefox/patches/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
| 34
http/firefox/patches/0032-gcc-lto-patch-from-opensuse.patch
| 97 ++
42 files changed, 1493 insertions(+), 1368 deletions(-)
New commits:
commit 458373d1b047a8c7ced069b266899e69539b131e
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>
http/firefox: updated patches for 117.0
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 3978915..ffbf98e 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,6 @@
+2023-09-09 Pavel Vinogradov <public AT sorcemage.org>
+ * patches/*: updated
+
2023-08-29 Pavel Vinogradov <public AT sorcemage.org>
* DETAILS: version 117.0, SECURITY_PATCH++
* DEPENDS: nss >= 3.92
diff --git a/http/firefox/patches/0012-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0012-Make-PGO-use-toolchain.patch
deleted file mode 100644
index 3f72b05..0000000
--- a/http/firefox/patches/0012-Make-PGO-use-toolchain.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 45d43bb2dc1c1c033c860951c93261e98647f851 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:13:34 +0200
-Subject: [PATCH 18/30] Make PGO use toolchain
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/unix/mozconfig.unix | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
-index 9ca9c97fce..9f86fe0940 100644
---- a/build/unix/mozconfig.unix
-+++ b/build/unix/mozconfig.unix
-@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
- CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
- CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
-
-+ if [ -n "$MOZ_PGO" ]; then
-+ if [ -z "$USE_ARTIFACT" ]; then
-+ ac_add_options --enable-lto
-+ fi
-+ export AR="$topsrcdir/gcc/bin/gcc-ar"
-+ export NM="$topsrcdir/gcc/bin/gcc-nm"
-+ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
-+ fi
-+
- # We want to make sure we use binutils and other binaries in the
tooltool
- # package.
- mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
---
-2.34.1
-
diff --git a/http/firefox/patches/0012-build-Disable-Werror.patch
b/http/firefox/patches/0012-build-Disable-Werror.patch
new file mode 100644
index 0000000..e1df117
--- /dev/null
+++ b/http/firefox/patches/0012-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-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
b/http/firefox/patches/0013-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..32bd0eb
--- /dev/null
+++
b/http/firefox/patches/0013-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/0013-build-Disable-Werror.patch
b/http/firefox/patches/0013-build-Disable-Werror.patch
deleted file mode 100644
index e1df117..0000000
--- a/http/firefox/patches/0013-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/0014-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
b/http/firefox/patches/0014-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 0000000..5e48dd2
--- /dev/null
+++
b/http/firefox/patches/0014-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/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
deleted file mode 100644
index 32bd0eb..0000000
---
a/http/firefox/patches/0014-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/0015-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
b/http/firefox/patches/0015-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
deleted file mode 100644
index 5e48dd2..0000000
---
a/http/firefox/patches/0015-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/0015-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0015-bgo-816975-fix-build-on-x86.patch
new file mode 100644
index 0000000..4b2289f
--- /dev/null
+++ b/http/firefox/patches/0015-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/0016-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0016-bgo-816975-fix-build-on-x86.patch
deleted file mode 100644
index 4b2289f..0000000
--- a/http/firefox/patches/0016-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/0016-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0016-bmo-1559213-fix-system-av1-libs.patch
new file mode 100644
index 0000000..d687e8f
--- /dev/null
+++ b/http/firefox/patches/0016-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/0017-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0017-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..864741e
--- /dev/null
+++ b/http/firefox/patches/0017-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/0017-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0017-bmo-1559213-fix-system-av1-libs.patch
deleted file mode 100644
index d687e8f..0000000
--- a/http/firefox/patches/0017-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/0018-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0018-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 864741e..0000000
--- a/http/firefox/patches/0018-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/0018-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0018-bmo-1754469-memory_mozalloc_throw.patch
new file mode 100644
index 0000000..634892be
--- /dev/null
+++ b/http/firefox/patches/0018-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/0019-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0019-bgo-860033-firefox-wayland-no-dbus.patch
new file mode 100644
index 0000000..7cf532a
--- /dev/null
+++ b/http/firefox/patches/0019-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/0019-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0019-bmo-1754469-memory_mozalloc_throw.patch
deleted file mode 100644
index 634892be..0000000
--- a/http/firefox/patches/0019-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/0020-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0020-bgo-860033-firefox-wayland-no-dbus.patch
deleted file mode 100644
index 7cf532a..0000000
--- a/http/firefox/patches/0020-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/0020-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0020-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
new file mode 100644
index 0000000..51f7faa
--- /dev/null
+++ b/http/firefox/patches/0020-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/0021-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0021-bgo-908297-ppc64-webrtc.patch
new file mode 100644
index 0000000..e4f12bc
--- /dev/null
+++ b/http/firefox/patches/0021-bgo-908297-ppc64-webrtc.patch
@@ -0,0 +1,30 @@
+diff -r 4cb22dd449d6 third_party/libwebrtc/moz.build
+--- a/third_party/libwebrtc/moz.build Mon Aug 07 08:16:50 2023 +0000
++++ b/third_party/libwebrtc/moz.build Tue Aug 08 13:57:02 2023 -0700
+@@ -603,16 +603,26 @@
+ "/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/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":
\ No newline at end of file
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
deleted file mode 100644
index 51f7faa..0000000
--- a/http/firefox/patches/0021-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/0022-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0022-bmo-1516803-gcc-lto-sandbox.patch
new file mode 100644
index 0000000..eff08f6
--- /dev/null
+++ b/http/firefox/patches/0022-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/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
deleted file mode 100644
index 29d37c1..0000000
---
a/http/firefox/patches/0022-fix-building-gcc-pgo-and-disable-watchdog-on-pgo-builds.patch
+++ /dev/null
@@ -1,98 +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-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/0023-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0023-bgo-908297-ppc64-webrtc.patch
deleted file mode 100644
index 14e8c4a..0000000
--- a/http/firefox/patches/0023-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/0023-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0023-enable-vaapi-on-all-amd-cards.patch
new file mode 100644
index 0000000..112cd42
--- /dev/null
+++ b/http/firefox/patches/0023-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/0024-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0024-bgo-907963-rustflags-single-string.patch
new file mode 100644
index 0000000..a56aec4
--- /dev/null
+++ b/http/firefox/patches/0024-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/0024-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0024-bmo-1516803-gcc-lto-sandbox.patch
deleted file mode 100644
index eff08f6..0000000
--- a/http/firefox/patches/0024-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-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
b/http/firefox/patches/0025-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
new file mode 100644
index 0000000..bb0621a
--- /dev/null
+++
b/http/firefox/patches/0025-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/0025-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0025-enable-vaapi-on-all-amd-cards.patch
deleted file mode 100644
index 112cd42..0000000
--- a/http/firefox/patches/0025-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/0026-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0026-bgo-907963-rustflags-single-string.patch
deleted file mode 100644
index a56aec4..0000000
--- a/http/firefox/patches/0026-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/0026-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
b/http/firefox/patches/0026-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
new file mode 100644
index 0000000..4d5edb4
--- /dev/null
+++
b/http/firefox/patches/0026-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/0027-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
b/http/firefox/patches/0027-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0027-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/0027-bgo-911679-gcc-binutils-2.41.patch
b/http/firefox/patches/0027-bgo-911679-gcc-binutils-2.41.patch
new file mode 100644
index 0000000..9f8ce30
--- /dev/null
+++ b/http/firefox/patches/0027-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/0028-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
b/http/firefox/patches/0028-bmo-1839615-configure-libva-logging-according-to-platform-decoder.patch
new file mode 100644
index 0000000..4a61c39
--- /dev/null
+++
b/http/firefox/patches/0028-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/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
deleted file mode 100644
index 4d5edb4..0000000
---
a/http/firefox/patches/0028-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/0029-bgo-911679-gcc-binutils-2.41.patch
b/http/firefox/patches/0029-bgo-911679-gcc-binutils-2.41.patch
deleted file mode 100644
index 9f8ce30..0000000
--- a/http/firefox/patches/0029-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/0029-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
b/http/firefox/patches/0029-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/0029-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/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
deleted file mode 100644
index 4a61c39..0000000
---
a/http/firefox/patches/0030-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;
-
diff --git
a/http/firefox/patches/0030-bmo-1849869-update-proc-macro2-to-1.0.66.patch
b/http/firefox/patches/0030-bmo-1849869-update-proc-macro2-to-1.0.66.patch
new file mode 100644
index 0000000..bc99b34
--- /dev/null
+++ b/http/firefox/patches/0030-bmo-1849869-update-proc-macro2-to-1.0.66.patch
@@ -0,0 +1,127 @@
+From e31d61910049e097afdd3d27c37786309082bdcb Mon Sep 17 00:00:00 2001
+From: David Tolnay <dtolnay AT gmail.com>
+Date: Wed, 7 Jun 2023 22:29:09 -0700
+Subject: [PATCH] Delete use of proc_macro::Span::before/after
+
+---
+ build.rs | 5 +----
+ src/fallback.rs | 20 --------------------
+ src/lib.rs | 23 +----------------------
+ src/wrapper.rs | 16 ----------------
+ 4 files changed, 2 insertions(+), 62 deletions(-)
+
+diff --git a/third_party/rust/proc-macro2/build.rs
b/third_party/rust/proc-macro2/build.rs
+index 199cdff9..0f4338dd 100644
+--- a/third_party/rust/proc-macro2/build.rs
++++ b/third_party/rust/proc-macro2/build.rs
+@@ -111,10 +111,7 @@ fn main() {
+ println!("cargo:rustc-cfg=wrap_proc_macro");
+ }
+
+- if version.nightly
+- && feature_allowed("proc_macro_span")
+- && feature_allowed("proc_macro_span_shrink")
+- {
++ if version.nightly && feature_allowed("proc_macro_span") {
+ println!("cargo:rustc-cfg=proc_macro_span");
+ }
+
+diff --git a/third_party/rust/proc-macro2/src/fallback.rs
b/third_party/rust/proc-macro2/src/fallback.rs
+index c6d2f38a..1b8b1257 100644
+--- a/third_party/rust/proc-macro2/src/fallback.rs
++++ b/third_party/rust/proc-macro2/src/fallback.rs
+@@ -541,26 +541,6 @@ impl Span {
+ })
+ }
+
+- #[cfg(procmacro2_semver_exempt)]
+- pub fn before(&self) -> Span {
+- Span {
+- #[cfg(span_locations)]
+- lo: self.lo,
+- #[cfg(span_locations)]
+- hi: self.lo,
+- }
+- }
+-
+- #[cfg(procmacro2_semver_exempt)]
+- pub fn after(&self) -> Span {
+- Span {
+- #[cfg(span_locations)]
+- lo: self.hi,
+- #[cfg(span_locations)]
+- hi: self.hi,
+- }
+- }
+-
+ #[cfg(not(span_locations))]
+ pub fn join(&self, _other: Span) -> Option<Span> {
+ Some(Span {})
+diff --git a/third_party/rust/proc-macro2/src/lib.rs
b/third_party/rust/proc-macro2/src/lib.rs
+index 260ac694..eb7c050e 100644
+--- a/third_party/rust/proc-macro2/src/lib.rs
++++ b/third_party/rust/proc-macro2/src/lib.rs
+@@ -87,10 +87,7 @@
+
+ // Proc-macro2 types in rustdoc of other crates get linked to here.
+ #![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.59")]
+-#![cfg_attr(
+- any(proc_macro_span, super_unstable),
+- feature(proc_macro_span, proc_macro_span_shrink)
+-)]
++#![cfg_attr(any(proc_macro_span, super_unstable), feature(proc_macro_span))]
+ #![cfg_attr(super_unstable, feature(proc_macro_def_site))]
+ #![cfg_attr(doc_cfg, feature(doc_cfg))]
+ #![allow(
+@@ -494,24 +491,6 @@ impl Span {
+ self.inner.end()
+ }
+
+- /// Creates an empty span pointing to directly before this span.
+- ///
+- /// This method is semver exempt and not exposed by default.
+- #[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro),
super_unstable)))]
+- #[cfg_attr(doc_cfg, doc(cfg(procmacro2_semver_exempt)))]
+- pub fn before(&self) -> Span {
+- Span::_new(self.inner.before())
+- }
+-
+- /// Creates an empty span pointing to directly after this span.
+- ///
+- /// This method is semver exempt and not exposed by default.
+- #[cfg(all(procmacro2_semver_exempt, any(not(wrap_proc_macro),
super_unstable)))]
+- #[cfg_attr(doc_cfg, doc(cfg(procmacro2_semver_exempt)))]
+- pub fn after(&self) -> Span {
+- Span::_new(self.inner.after())
+- }
+-
+ /// Create a new span encompassing `self` and `other`.
+ ///
+ /// Returns `None` if `self` and `other` are from different files.
+diff --git a/third_party/rust/proc-macro2/src/wrapper.rs
b/third_party/rust/proc-macro2/src/wrapper.rs
+index 55131e86..c422e4f0 100644
+--- a/third_party/rust/proc-macro2/src/wrapper.rs
++++ b/third_party/rust/proc-macro2/src/wrapper.rs
+@@ -483,22 +483,6 @@ impl Span {
+ }
+ }
+
+- #[cfg(super_unstable)]
+- pub fn before(&self) -> Span {
+- match self {
+- Span::Compiler(s) => Span::Compiler(s.before()),
+- Span::Fallback(s) => Span::Fallback(s.before()),
+- }
+- }
+-
+- #[cfg(super_unstable)]
+- pub fn after(&self) -> Span {
+- match self {
+- Span::Compiler(s) => Span::Compiler(s.after()),
+- Span::Fallback(s) => Span::Fallback(s.after()),
+- }
+- }
+-
+ pub fn join(&self, other: Span) -> Option<Span> {
+ let ret = match (self, other) {
+ #[cfg(proc_macro_span)]
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
deleted file mode 100644
index 49bd785..0000000
---
a/http/firefox/patches/0031-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
+++ /dev/null
@@ -1,451 +0,0 @@
-
-# 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/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
b/http/firefox/patches/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
new file mode 100644
index 0000000..f280b5e
--- /dev/null
+++
b/http/firefox/patches/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
@@ -0,0 +1,34 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla AT glandium.org>
+# Date 1692737029 0
+# Node ID 45044573c4398ac2a2a3a8b798a5ce413342b0aa
+# Parent faca0b32a21483f72d985fc2a7963e0178f3bbfd
+Bug 1849718 - Remove redundant `use`. r=canaltinova
+
+MarkerOptions is already imported via `pub use options::*;`.
+
+Differential Revision: https://phabricator.services.mozilla.com/D186664
+
+diff --git a/tools/profiler/rust-api/src/marker/mod.rs
b/tools/profiler/rust-api/src/marker/mod.rs
+--- a/tools/profiler/rust-api/src/marker/mod.rs
++++ b/tools/profiler/rust-api/src/marker/mod.rs
+@@ -122,17 +122,16 @@ pub mod options;
+ pub mod schema;
+
+ pub use options::*;
+ pub use schema::MarkerSchema;
+
+ use crate::gecko_bindings::{bindings,
profiling_categories::ProfilingCategoryPair};
+ use crate::json_writer::JSONWriter;
+ use crate::marker::deserializer_tags_state::get_or_insert_deserializer_tag;
+-use crate::marker::options::MarkerOptions;
+ use serde::{de::DeserializeOwned, Deserialize, Serialize};
+ use std::os::raw::c_char;
+
+ /// Marker API to add a new simple marker without any payload.
+ /// Please see the module documentation on how to add a marker with this
API.
+ pub fn add_untyped_marker(name: &str, category: ProfilingCategoryPair, mut
options: MarkerOptions) {
+ if !crate::profiler_state::can_accept_markers() {
+ // Nothing to do.
+
diff --git a/http/firefox/patches/0032-gcc-lto-patch-from-opensuse.patch
b/http/firefox/patches/0032-gcc-lto-patch-from-opensuse.patch
new file mode 100644
index 0000000..24e4ba3
--- /dev/null
+++ b/http/firefox/patches/0032-gcc-lto-patch-from-opensuse.patch
@@ -0,0 +1,97 @@
+Index: firefox-115.0/build/pgo/profileserver.py
+===================================================================
+--- firefox-115.0.orig/build/pgo/profileserver.py
++++ firefox-115.0/build/pgo/profileserver.py
+@@ -11,7 +11,7 @@ import subprocess
+ import sys
+
+ import mozcrash
+-from mozbuild.base import BinaryNotFoundException, MozbuildObject
++from mozbuild.base import BinaryNotFoundException, MozbuildObject,
BuildEnvironmentNotFoundException
+ from mozfile import TemporaryDirectory
+ from mozhttpd import MozHttpd
+ from mozprofile import FirefoxProfile, Preferences
+@@ -87,9 +87,22 @@ if __name__ == "__main__":
+ locations = ServerLocations()
+ locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
+
+- old_profraw_files = glob.glob("*.profraw")
+- for f in old_profraw_files:
+- os.remove(f)
++ using_gcc = False
++ try:
++ if build.config_environment.substs.get('CC_TYPE') == 'gcc':
++ using_gcc = True
++ except BuildEnvironmentNotFoundException:
++ pass
++
++ if using_gcc:
++ for dirpath, _, filenames in os.walk('.'):
++ for f in filenames:
++ if f.endswith('.gcda'):
++ os.remove(os.path.join(dirpath, f))
++ else:
++ old_profraw_files = glob.glob('*.profraw')
++ for f in old_profraw_files:
++ os.remove(f)
+
+ with TemporaryDirectory() as profilePath:
+ # TODO: refactor this into mozprofile
+@@ -213,6 +226,10 @@ if __name__ == "__main__":
+ 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")
+Index: firefox-115.0/build/unix/mozconfig.unix
+===================================================================
+--- firefox-115.0.orig/build/unix/mozconfig.unix
++++ firefox-115.0/build/unix/mozconfig.unix
+@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
+ CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
+ CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
+
++ if [ -n "$MOZ_PGO" ]; then
++ if [ -z "$USE_ARTIFACT" ]; then
++ ac_add_options --enable-lto
++ fi
++ export AR="$topsrcdir/gcc/bin/gcc-ar"
++ export NM="$topsrcdir/gcc/bin/gcc-nm"
++ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
++ fi
++
+ # We want to make sure we use binutils and other binaries in the
tooltool
+ # package.
+ mk_add_options "export
PATH=$MOZ_FETCHES_DIR/gcc/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH"
+Index: firefox-115.0/extensions/spellcheck/src/moz.build
+===================================================================
+--- firefox-115.0.orig/extensions/spellcheck/src/moz.build
++++ firefox-115.0/extensions/spellcheck/src/moz.build
+@@ -28,3 +28,5 @@ EXPORTS.mozilla += [
+ "mozInlineSpellChecker.h",
+ "mozSpellChecker.h",
+ ]
++
++CXXFLAGS += ['-fno-devirtualize']
+Index: firefox-115.0/toolkit/components/terminator/nsTerminator.cpp
+===================================================================
+--- firefox-115.0.orig/toolkit/components/terminator/nsTerminator.cpp
++++ firefox-115.0/toolkit/components/terminator/nsTerminator.cpp
+@@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() {
+ }
+ #endif
+
++ // Disable watchdog for PGO train builds - writting profile information at
++ // exit may take time and it is better to make build hang rather than
++ // silently produce poorly performing binary.
++ crashAfterMS = INT32_MAX;
++
+ UniquePtr<Options> options(new Options());
+ // crashAfterTicks is guaranteed to be > 0 as
+ // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
+
- [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (458373d1b047a8c7ced069b266899e69539b131e), Pavel Vinogradov, 09/09/2023
Archive powered by MHonArc 2.6.24.