Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (654f8ec33b378bdc364bd27f56dc9dbc54c97f79)
  • Date: Wed, 27 Sep 2023 22:45:50 +0000

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

http/firefox/DEPENDS
| 2
http/firefox/DETAILS
| 4
http/firefox/HISTORY
| 5
http/firefox/patches/0020-bgo-908297-ppc64-webrtc.patch
| 30
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-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0022-bmo-1516803-gcc-lto-sandbox.patch
| 16
http/firefox/patches/0022-enable-vaapi-on-all-amd-cards.patch
| 19
http/firefox/patches/0023-bgo-907963-rustflags-single-string.patch
| 76 +
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-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20

http/firefox/patches/0025-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20
http/firefox/patches/0025-gcc-lto-patch-from-opensuse.patch
| 97 ++
http/firefox/patches/0026-bgo-914738-nodbus-fix2.patch
| 13

http/firefox/patches/0026-bmo-1844484-override-compiler-vtables-symbol-for-pure-virtual-methods.patch
| 150 ---
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/0029-bmo-1846701-Rename-MOZ_WAYLAND_USE_HWDECODE-to-MOZ_USE_HWDECODE.patch
| 451 ----------
http/firefox/patches/0030-bmo-1849869-update-proc-macro2-to-1.0.66.patch
| 127 --

http/firefox/patches/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
| 34
http/firefox/patches/0032-gcc-lto-patch-from-opensuse.patch
| 97 --
23 files changed, 279 insertions(+), 1243 deletions(-)

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

http/firefox: version 118.0, SECURITY_PATCH++

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

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

-local NSS_BRANCH="3.92" &&
+local NSS_BRANCH="3.93" &&
if spell_ok nss &&
is_version_less "$(installed_version nss)" "${NSS_BRANCH}"; then
depends -sub "${NSS_BRANCH}" nss "--with-system-nss"
diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index b733da7..0683811 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=117.0.1
- SECURITY_PATCH=182
+ VERSION=118.0
+ SECURITY_PATCH=183
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 7865256..ec3ef5e 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2023-09-27 Pavel Vinogradov <public AT sorcemage.org>
+ * DETAILS: version 118.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.93
+ * patches/*: updated
+
2023-09-12 Pavel Vinogradov <public AT sorcemage.org>
* DETAILS: version 117.0.1, SECURITY_PATCH++, (CVE-2023-4863)

diff --git a/http/firefox/patches/0020-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0020-bgo-908297-ppc64-webrtc.patch
new file mode 100644
index 0000000..e4f12bc
--- /dev/null
+++ b/http/firefox/patches/0020-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/0020-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0020-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
deleted file mode 100644
index 51f7faa..0000000
--- a/http/firefox/patches/0020-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/0021-bgo-908297-ppc64-webrtc.patch
b/http/firefox/patches/0021-bgo-908297-ppc64-webrtc.patch
deleted file mode 100644
index e4f12bc..0000000
--- a/http/firefox/patches/0021-bgo-908297-ppc64-webrtc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0021-bmo-1516803-gcc-lto-sandbox.patch
new file mode 100644
index 0000000..eff08f6
--- /dev/null
+++ b/http/firefox/patches/0021-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-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0022-bmo-1516803-gcc-lto-sandbox.patch
deleted file mode 100644
index eff08f6..0000000
--- a/http/firefox/patches/0022-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/0022-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0022-enable-vaapi-on-all-amd-cards.patch
new file mode 100644
index 0000000..112cd42
--- /dev/null
+++ b/http/firefox/patches/0022-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/0023-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0023-bgo-907963-rustflags-single-string.patch
new file mode 100644
index 0000000..a56aec4
--- /dev/null
+++ b/http/firefox/patches/0023-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/0023-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0023-enable-vaapi-on-all-amd-cards.patch
deleted file mode 100644
index 112cd42..0000000
--- a/http/firefox/patches/0023-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/0024-bgo-907963-rustflags-single-string.patch
b/http/firefox/patches/0024-bgo-907963-rustflags-single-string.patch
deleted file mode 100644
index a56aec4..0000000
--- a/http/firefox/patches/0024-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/0024-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch

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

b/http/firefox/patches/0025-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0025-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/0025-gcc-lto-patch-from-opensuse.patch
b/http/firefox/patches/0025-gcc-lto-patch-from-opensuse.patch
new file mode 100644
index 0000000..24e4ba3
--- /dev/null
+++ b/http/firefox/patches/0025-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
+
diff --git a/http/firefox/patches/0026-bgo-914738-nodbus-fix2.patch
b/http/firefox/patches/0026-bgo-914738-nodbus-fix2.patch
new file mode 100644
index 0000000..5b1a2ff
--- /dev/null
+++ b/http/firefox/patches/0026-bgo-914738-nodbus-fix2.patch
@@ -0,0 +1,13 @@
+--- a/widget/gtk/nsAppShell.cpp
++++ b/widget/gtk/nsAppShell.cpp
+@@ -296,8 +296,10 @@
+ do_GetService(POWERMANAGERSERVICE_CONTRACTID);
+
+ if (powerManagerService) {
++#ifdef MOZ_ENABLE_DBUS
+ powerManagerService->AddWakeLockListener(
+ WakeLockListener::GetSingleton());
++#endif
+ } else {
+ NS_WARNING(
+ "Failed to retrieve PowerManagerService, wakelocks will be
broken!");
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
deleted file mode 100644
index 4d5edb4..0000000
---
a/http/firefox/patches/0026-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/0027-bgo-911679-gcc-binutils-2.41.patch
b/http/firefox/patches/0027-bgo-911679-gcc-binutils-2.41.patch
deleted file mode 100644
index 9f8ce30..0000000
--- a/http/firefox/patches/0027-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/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
deleted file mode 100644
index 4a61c39..0000000
---
a/http/firefox/patches/0028-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/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
deleted file mode 100644
index 49bd785..0000000
---
a/http/firefox/patches/0029-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/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
deleted file mode 100644
index bc99b34..0000000
--- a/http/firefox/patches/0030-bmo-1849869-update-proc-macro2-to-1.0.66.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-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-1849718-drop-double-import-for-markeroptions.patch

b/http/firefox/patches/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
deleted file mode 100644
index f280b5e..0000000
---
a/http/firefox/patches/0031-bmo-1849718-drop-double-import-for-markeroptions.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-
-# 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
deleted file mode 100644
index 24e4ba3..0000000
--- a/http/firefox/patches/0032-gcc-lto-patch-from-opensuse.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-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 (654f8ec33b378bdc364bd27f56dc9dbc54c97f79), Pavel Vinogradov, 09/27/2023

Archive powered by MHonArc 2.6.24.

Top of Page