Skip to Content.
Sympa Menu

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

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 (b8a24d53bfc73f9d1c6af6323ad941411e0c94cf)
  • Date: Mon, 6 Sep 2021 18:17:30 +0000

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

http/firefox/DEPENDS
| 2
http/firefox/DETAILS
| 4
http/firefox/HISTORY
| 5
http/firefox/patches/0001-Don-t-use-build-id.patch
| 14 -
http/firefox/patches/0002-Fortify-sources-properly.patch
| 8
http/firefox/patches/0003-Check-additional-plugins-dir.patch
| 6
http/firefox/patches/0004-bmo-847568-Support-system-harfbuzz.patch
| 52 ++---
http/firefox/patches/0005-bmo-847568-Support-system-graphite2.patch
| 42 ++--
http/firefox/patches/0006-bmo-1559213-Support-system-av1.patch
| 20 +-
http/firefox/patches/0007-Support-sndio-audio-framework.patch
| 14 -
http/firefox/patches/0008-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
| 6
http/firefox/patches/0009-bmo-1516803-Fix-building-sandbox.patch
| 6

http/firefox/patches/0010-Fix-building-spellchecker-when-using-GCC-and-PGO.patch
| 6

http/firefox/patches/0011-bmo-1526653-Include-struct-definitions-for-user_vfp-.patch
| 38 ---

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

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

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

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

http/firefox/patches/0016-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
| 28 ++

http/firefox/patches/0017-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
| 28 --

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

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

http/firefox/patches/0018-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
| 48 -----

http/firefox/patches/0019-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
| 27 ++

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

http/firefox/patches/0020-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
| 27 --
http/firefox/patches/0021-Make-PGO-use-toolchain.patch
| 33 ---

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

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

http/firefox/patches/0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
| 32 +++
http/firefox/patches/0023-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 28 ++

http/firefox/patches/0023-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
| 32 ---
http/firefox/patches/0024-Fix-building-with-PGO-when-using-GCC.patch
| 84 ++++++++
http/firefox/patches/0024-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 28 --
http/firefox/patches/0025-Fix-building-with-PGO-when-using-GCC.patch
| 84 --------

http/firefox/patches/0025-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
| 28 ++
http/firefox/patches/0026-build-Disable-Werror.patch
| 28 ++

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

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

http/firefox/patches/0028-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 ---
http/firefox/patches/0028-Make-elfhack-use-toolchain.patch
| 26 ++
http/firefox/patches/0029-Disable-FFVPX-with-VA-API.patch
| 91 +++++++++
http/firefox/patches/0029-Make-elfhack-use-toolchain.patch
| 26 --
http/firefox/patches/0030-Disable-FFVPX-with-VA-API.patch
| 91 ---------

http/firefox/patches/0030-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 36 +++

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

http/firefox/patches/0031-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
| 96 ++++++++++

http/firefox/patches/0032-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
| 55 +++++

http/firefox/patches/0032-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
| 96 ----------

http/firefox/patches/0033-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
| 55 -----

http/firefox/patches/0033-bmo-1728749-Pre-select-OS-dialog-when-using-Pipewire.patch
| 30 +++
http/firefox/patches/0034-bmo-1721326-Allow-dynamic-PTHREAD_STACK_MIN.patch
| 53 -----
http/firefox/patches/0035-bmo-1721326-Use-small-stack-for-DoClone.patch
| 49 -----
59 files changed, 1021 insertions(+), 1126 deletions(-)

New commits:
commit b8a24d53bfc73f9d1c6af6323ad941411e0c94cf
Author: Pavel Vinogradov <public AT sourcemaage.org>
Commit: Pavel Vinogradov <public AT sourcemaage.org>

http/firefox: version 92.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index 1a4dc69..c5f450e 100755
--- a/http/firefox/DEPENDS
+++ b/http/firefox/DEPENDS
@@ -36,7 +36,7 @@ depends libwebp "--with-system-webp"
&&

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

-local NSS_BRANCH="3.68" &&
+local NSS_BRANCH="3.69" &&
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 c32e7fc..33d3898 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=91.0.2
- SECURITY_PATCH=152
+ VERSION=92.0
+ SECURITY_PATCH=153
SOURCE="${SPELL}-${VERSION}.source.tar.xz"

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
SOURCE2="${SOURCE}.asc"
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 6ac75d9..07355d3 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2021-09-06 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 92.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.69
+ * patches/*: updated
+
2021-08-23 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 91.0.2

diff --git a/http/firefox/patches/0001-Don-t-use-build-id.patch
b/http/firefox/patches/0001-Don-t-use-build-id.patch
index d0e9594..5c1052a 100644
--- a/http/firefox/patches/0001-Don-t-use-build-id.patch
+++ b/http/firefox/patches/0001-Don-t-use-build-id.patch
@@ -1,7 +1,7 @@
-From 10709c00bf1c2408db74f886c53a2f6338055d57 Mon Sep 17 00:00:00 2001
+From 521330193e7778c1eee1d106b812c2a78ffc3c94 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy AT gentoo.org>
Date: Mon, 6 Apr 2020 19:14:26 +0200
-Subject: [PATCH 01/35] Don't use build id
+Subject: [PATCH 01/33] Don't use build id

We must drop build id as it causes conflicts when merging
thunderbird/firefox/seamonkey on same system when using
@@ -14,10 +14,10 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
2 files changed, 14 deletions(-)

diff --git a/js/src/old-configure.in b/js/src/old-configure.in
-index 77652f6752..ffd0287f7c 100644
+index e96ea982ed..8bfcc8aff3 100644
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
-@@ -361,13 +361,6 @@ if test "$GNU_CC"; then
+@@ -350,13 +350,6 @@ if test "$GNU_CC"; then
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)

@@ -32,10 +32,10 @@ index 77652f6752..ffd0287f7c 100644
fi

diff --git a/old-configure.in b/old-configure.in
-index de2642f71d..f2c4a7d4ac 100644
+index 8f8ae6eb07..78c358a3b1 100644
--- a/old-configure.in
+++ b/old-configure.in
-@@ -348,13 +348,6 @@ if test "$GNU_CC"; then
+@@ -337,13 +337,6 @@ if test "$GNU_CC"; then
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)

@@ -50,5 +50,5 @@ index de2642f71d..f2c4a7d4ac 100644
HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=
_SAVE_LDFLAGS=$LDFLAGS
--
-2.32.0
+2.33.0

diff --git a/http/firefox/patches/0002-Fortify-sources-properly.patch
b/http/firefox/patches/0002-Fortify-sources-properly.patch
index 671d504..60c58e9 100644
--- a/http/firefox/patches/0002-Fortify-sources-properly.patch
+++ b/http/firefox/patches/0002-Fortify-sources-properly.patch
@@ -1,7 +1,7 @@
-From 9ebb6eeb4572273a8424a6b80dd8f6b5df312bca Mon Sep 17 00:00:00 2001
+From 288e147c84109195b179e45a9c4632d3c4ca1748 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy AT gentoo.org>
Date: Mon, 6 Apr 2020 19:16:36 +0200
-Subject: [PATCH 02/35] Fortify sources properly
+Subject: [PATCH 02/33] Fortify sources properly

Ensure we fortify properly, features.h is pulled in via fortification.

@@ -12,7 +12,7 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
2 files changed, 4 deletions(-)

diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index 6e017df20f..5f7b5bb23e 100644
+index e8953cf55b..9018d3e580 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -229,7 +229,6 @@ system_headers = [
@@ -37,5 +37,5 @@ index 16c9b33329..df38d9336c 100644

#endif /* _SDP_OS_DEFS_H_ */
--
-2.32.0
+2.33.0

diff --git a/http/firefox/patches/0003-Check-additional-plugins-dir.patch
b/http/firefox/patches/0003-Check-additional-plugins-dir.patch
index 0a8c765..5c7917e 100644
--- a/http/firefox/patches/0003-Check-additional-plugins-dir.patch
+++ b/http/firefox/patches/0003-Check-additional-plugins-dir.patch
@@ -1,7 +1,7 @@
-From 4928be6c17be5fde234f509e965d474cb27be5f9 Mon Sep 17 00:00:00 2001
+From 1cbfa1c2ea73ed8ec59a930970a9f4db66dd0629 Mon Sep 17 00:00:00 2001
From: Arfrever Frehtes Taifersar Arahesis <Arfrever AT Apache.Org>
Date: Mon, 6 Apr 2020 19:17:43 +0200
-Subject: [PATCH 03/35] Check additional plugins dir
+Subject: [PATCH 03/33] Check additional plugins dir

Check original plugins dir along with default plugins dir.

@@ -54,5 +54,5 @@ index ef974f9904..6261eafcc8 100644
static const char* keys[] = {NS_USER_PLUGINS_DIR, nullptr};
# endif
--
-2.32.0
+2.33.0

diff --git
a/http/firefox/patches/0004-bmo-847568-Support-system-harfbuzz.patch
b/http/firefox/patches/0004-bmo-847568-Support-system-harfbuzz.patch
index 4e23a5a..94ff397 100644
--- a/http/firefox/patches/0004-bmo-847568-Support-system-harfbuzz.patch
+++ b/http/firefox/patches/0004-bmo-847568-Support-system-harfbuzz.patch
@@ -1,7 +1,7 @@
-From 193b5459953e4d0291eb171f8dc5039bbbf0b65e Mon Sep 17 00:00:00 2001
+From c181d0a485fc740baffda0dec8a17305406a11a2 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Mon, 6 Apr 2020 19:32:39 +0200
-Subject: [PATCH 04/35] bmo#847568: Support system harfbuzz
+Subject: [PATCH 04/33] bmo#847568: Support system harfbuzz

Allow building against system-wide harfbuzz.

@@ -21,10 +21,10 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
10 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index 5f7b5bb23e..449328ffaa 100644
+index 9018d3e580..a2977231ee 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -1236,6 +1236,13 @@ if CONFIG['OS_TARGET'] == 'Android':
+@@ -1235,6 +1235,13 @@ if CONFIG['OS_TARGET'] == 'Android':
'vr/gvr/capi/include/gvr.h',
]

@@ -53,20 +53,20 @@ index fa75996f78..56652f41de 100644
"UseCounterList.h",
script="gen-usecounters.py",
diff --git a/gfx/moz.build b/gfx/moz.build
-index 82623117ab..2f2d3dc54f 100644
+index 4d6d63da9d..8222b72333 100644
--- a/gfx/moz.build
+++ b/gfx/moz.build
-@@ -13,6 +13,9 @@ with Files("wr/**"):
- if CONFIG["MOZ_TREE_CAIRO"]:
- DIRS += ["cairo"]
+@@ -10,6 +10,9 @@ with Files("**"):
+ with Files("wr/**"):
+ BUG_COMPONENT = ("Core", "Graphics: WebRender")

+if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ DIRS += ["harfbuzz/src"]
+
DIRS += [
+ "cairo",
"2d",
- "ycbcr",
-@@ -22,7 +25,6 @@ DIRS += [
+@@ -20,7 +23,6 @@ DIRS += [
"gl",
"layers",
"graphite2/src",
@@ -75,7 +75,7 @@ index 82623117ab..2f2d3dc54f 100644
"thebes",
"ipc",
diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
-index e23ec37b1a..85e9beb81d 100755
+index 7d6644f65e..ba37dc9f90 100755
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -97,6 +97,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
@@ -86,10 +86,10 @@ index e23ec37b1a..85e9beb81d 100755
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
- CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
- CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+ LOCAL_INCLUDES += [
+ "/gfx/cairo/cairo/src",
diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
-index 7d5ad42f48..fe5751a33f 100755
+index 4ff948f567..6e920ff27f 100755
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -489,6 +489,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
@@ -100,13 +100,13 @@ index 7d5ad42f48..fe5751a33f 100755
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
- CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
- CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+ LOCAL_INCLUDES += [
+ "/gfx/cairo/cairo/src",
diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
-index baa7005a8f..7f1bde7f37 100644
+index 04692dbf30..e1cbefb604 100644
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
-@@ -293,6 +293,9 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
+@@ -290,6 +290,9 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]

DEFINES["GRAPHITE2_STATIC"] = True

@@ -145,12 +145,12 @@ index 1498dd2ceb..026798bf71 100644

if CONFIG["CC_TYPE"] in ("clang", "gcc"):
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
-index bf771ca044..8f9525edc0 100644
+index 5e2d8cb4cd..4b7194e9e2 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
-@@ -254,6 +254,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]:
- OS_LIBS += CONFIG["MOZ_CAIRO_OSLIBS"]
- OS_LIBS += CONFIG["MOZ_WEBRTC_X11_LIBS"]
+@@ -242,6 +242,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]:
+ "-lgvr",
+ ]

+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
@@ -159,12 +159,12 @@ index bf771ca044..8f9525edc0 100644
OS_LIBS += CONFIG["MOZ_JPEG_LIBS"]

diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index 026e7fa7ba..61413a1ae7 100644
+index 8bad820dce..39944c4aa1 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
-@@ -475,6 +475,15 @@ add_old_configure_assignment(
- "_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True)
+@@ -460,6 +460,15 @@ add_old_configure_assignment(
)
+ set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True))

+# HarfBuzz
+# ==============================================================
@@ -179,5 +179,5 @@ index 026e7fa7ba..61413a1ae7 100644
# ==============================================================
@depends(toolkit)
--
-2.32.0
+2.33.0

diff --git
a/http/firefox/patches/0005-bmo-847568-Support-system-graphite2.patch
b/http/firefox/patches/0005-bmo-847568-Support-system-graphite2.patch
index 432caf0..96759b3 100644
--- a/http/firefox/patches/0005-bmo-847568-Support-system-graphite2.patch
+++ b/http/firefox/patches/0005-bmo-847568-Support-system-graphite2.patch
@@ -1,7 +1,7 @@
-From eb6d66db4848a70f73257f49096804b1bef8b0e0 Mon Sep 17 00:00:00 2001
+From 657a415b434ed2f747068ce3763b66b029ca3897 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Mon, 6 Apr 2020 19:34:44 +0200
-Subject: [PATCH 05/35] bmo#847568: Support system graphite2
+Subject: [PATCH 05/33] bmo#847568: Support system graphite2

Allow building against system-wide graphite2.

@@ -20,10 +20,10 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
create mode 100644 gfx/graphite2/geckoextra/moz.build

diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index 449328ffaa..27b5171d0a 100644
+index a2977231ee..e97a65307f 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -1243,6 +1243,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+@@ -1242,6 +1242,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
'harfbuzz/hb.h',
]

@@ -94,12 +94,12 @@ index b91d9c161c..a97e6eb203 100755
echo
echo If gfx/graphite2/src/files.mk has changed, please make corresponding
diff --git a/gfx/moz.build b/gfx/moz.build
-index 2f2d3dc54f..c7cfdba9c6 100644
+index 8222b72333..16a2b401db 100644
--- a/gfx/moz.build
+++ b/gfx/moz.build
-@@ -13,6 +13,11 @@ with Files("wr/**"):
- if CONFIG["MOZ_TREE_CAIRO"]:
- DIRS += ["cairo"]
+@@ -10,6 +10,11 @@ with Files("**"):
+ with Files("wr/**"):
+ BUG_COMPONENT = ("Core", "Graphics: WebRender")

+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
+ DIRS += ["graphite2/geckoextra"]
@@ -109,7 +109,7 @@ index 2f2d3dc54f..c7cfdba9c6 100644
if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
DIRS += ["harfbuzz/src"]

-@@ -24,7 +29,6 @@ DIRS += [
+@@ -22,7 +27,6 @@ DIRS += [
"qcms",
"gl",
"layers",
@@ -118,10 +118,10 @@ index 2f2d3dc54f..c7cfdba9c6 100644
"thebes",
"ipc",
diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
-index 7f1bde7f37..4daf60b9dc 100644
+index e1cbefb604..4e5d693394 100644
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
-@@ -291,7 +291,10 @@ if CONFIG["MOZ_WAYLAND"]:
+@@ -288,7 +288,10 @@ if CONFIG["MOZ_WAYLAND"]:

LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]

@@ -134,10 +134,10 @@ index 7f1bde7f37..4daf60b9dc 100644
if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
diff --git a/old-configure.in b/old-configure.in
-index f2c4a7d4ac..e2c1013a78 100644
+index 78c358a3b1..2a9b8ad1d7 100644
--- a/old-configure.in
+++ b/old-configure.in
-@@ -2277,6 +2277,27 @@ if test "$USE_FC_FREETYPE"; then
+@@ -2205,6 +2205,27 @@ if test "$USE_FC_FREETYPE"; then
fi
fi

@@ -166,12 +166,12 @@ index f2c4a7d4ac..e2c1013a78 100644
dnl Check if we need the 32-bit Linux SSE2 error dialog
dnl ========================================================
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
-index 8f9525edc0..8137550ef7 100644
+index 4b7194e9e2..077f3f2556 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
-@@ -254,6 +254,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]:
- OS_LIBS += CONFIG["MOZ_CAIRO_OSLIBS"]
- OS_LIBS += CONFIG["MOZ_WEBRTC_X11_LIBS"]
+@@ -242,6 +242,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]:
+ "-lgvr",
+ ]

+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
+ OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"]
@@ -180,12 +180,12 @@ index 8f9525edc0..8137550ef7 100644
OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]

diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index 61413a1ae7..f51a3f0d60 100644
+index 39944c4aa1..ed1244266c 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
-@@ -475,6 +475,19 @@ add_old_configure_assignment(
- "_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True)
+@@ -460,6 +460,19 @@ add_old_configure_assignment(
)
+ set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True))

+# Graphite2
+# ==============================================================
@@ -204,5 +204,5 @@ index 61413a1ae7..f51a3f0d60 100644
# ==============================================================
option('--with-system-harfbuzz', help="Use system harfbuzz (located with
pkgconfig)")
--
-2.32.0
+2.33.0

diff --git a/http/firefox/patches/0006-bmo-1559213-Support-system-av1.patch
b/http/firefox/patches/0006-bmo-1559213-Support-system-av1.patch
index 5c2fb7d..10627c5 100644
--- a/http/firefox/patches/0006-bmo-1559213-Support-system-av1.patch
+++ b/http/firefox/patches/0006-bmo-1559213-Support-system-av1.patch
@@ -1,7 +1,7 @@
-From 78a7d2f39d7818bd8e7790281b70307699d21695 Mon Sep 17 00:00:00 2001
+From b96a9254f40da2322f4f0cb14fd0a3cfa7a79234 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Mon, 6 Apr 2020 19:36:02 +0200
-Subject: [PATCH 06/35] bmo#1559213: Support system av1
+Subject: [PATCH 06/33] bmo#1559213: Support system av1

Allow building against system-wide av1.

@@ -15,10 +15,10 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
4 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/config/external/moz.build b/config/external/moz.build
-index e473c12444..e6b4489e9d 100644
+index 0ca007a425..5baf34432c 100644
--- a/config/external/moz.build
+++ b/config/external/moz.build
-@@ -45,8 +45,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
+@@ -51,8 +51,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
external_dirs += ["media/libvpx"]

if CONFIG["MOZ_AV1"]:
@@ -31,10 +31,10 @@ index e473c12444..e6b4489e9d 100644
if not CONFIG["MOZ_SYSTEM_PNG"]:
external_dirs += ["media/libpng"]
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index 27b5171d0a..c6213f1d96 100644
+index e97a65307f..ca0e6a0ad8 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -1300,6 +1300,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
+@@ -1299,6 +1299,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
'proxy.h',
]

@@ -66,10 +66,10 @@ index 16ca8a9cbc..b349dcbe6d 100644
if CONFIG["MOZ_OMX"]:
EXPORTS += [
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index f51a3f0d60..184d88447d 100644
+index ed1244266c..b5fd725a46 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
-@@ -559,14 +559,29 @@ def av1(value):
+@@ -544,14 +544,29 @@ def av1(value):
if value:
return True

@@ -101,7 +101,7 @@ index f51a3f0d60..184d88447d 100644
def dav1d_nasm(target):
if target.cpu in ("x86", "x86_64"):
return namespace(version="2.14", what="AV1")
-@@ -576,6 +591,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
+@@ -561,6 +576,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
set_define("MOZ_DAV1D_ASM", dav1d_asm)
set_config("MOZ_AV1", av1)
set_define("MOZ_AV1", av1)
@@ -110,5 +110,5 @@ index f51a3f0d60..184d88447d 100644
# JXL Image Codec Support
# ==============================================================
--
-2.32.0
+2.33.0

diff --git a/http/firefox/patches/0007-Support-sndio-audio-framework.patch
b/http/firefox/patches/0007-Support-sndio-audio-framework.patch
index aad9ed5..2e12b73 100644
--- a/http/firefox/patches/0007-Support-sndio-audio-framework.patch
+++ b/http/firefox/patches/0007-Support-sndio-audio-framework.patch
@@ -1,7 +1,7 @@
-From 9fb8a22b50da2e62372222a67a13acf627691b30 Mon Sep 17 00:00:00 2001
+From 3d135800fc963fcf5267601daa673eb413ad4fb9 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Thu, 29 Apr 2021 18:54:42 +0200
-Subject: [PATCH 07/35] Support sndio audio framework
+Subject: [PATCH 07/33] Support sndio audio framework

Bug: https://bugs.gentoo.org/785613
Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
@@ -12,10 +12,10 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/build/moz.configure/old.configure
b/build/moz.configure/old.configure
-index 35ab75df3a..134ecfb2b0 100644
+index e3974613d6..235abf1a8c 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
-@@ -87,6 +87,7 @@ def old_configure_options(*options):
+@@ -91,6 +91,7 @@ def old_configure_options(*options):
@old_configure_options(
"--cache-file",
"--datadir",
@@ -43,10 +43,10 @@ index 872484c311..28994a693d 100644

if CONFIG['OS_TARGET'] == 'Darwin':
diff --git a/old-configure.in b/old-configure.in
-index e2c1013a78..682b815c82 100644
+index 2a9b8ad1d7..f32f321842 100644
--- a/old-configure.in
+++ b/old-configure.in
-@@ -2467,6 +2467,23 @@ fi
+@@ -2326,6 +2326,23 @@ fi
AC_SUBST(NECKO_WIFI)
AC_SUBST(NECKO_WIFI_DBUS)

@@ -71,5 +71,5 @@ index e2c1013a78..682b815c82 100644
dnl =
dnl = Maintainer debug option (no --enable equivalent)
--
-2.32.0
+2.33.0

diff --git
a/http/firefox/patches/0008-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
b/http/firefox/patches/0008-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
index 4a026c9..f38136e 100644
---
a/http/firefox/patches/0008-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
+++
b/http/firefox/patches/0008-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
@@ -1,7 +1,7 @@
-From 1c1be99b493410fb22c060cf9e403c284f9619ab Mon Sep 17 00:00:00 2001
+From 65df0601c51fbb7dc5b0ceb3ed01b046ca63a975 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Mon, 6 Apr 2020 19:41:43 +0200
-Subject: [PATCH 08/35] bmo#878089: Don't fail when TERM is not set
+Subject: [PATCH 08/33] bmo#878089: Don't fail when TERM is not set

Link: https://github.com/erikrose/blessings/pull/137
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=878089
@@ -32,5 +32,5 @@ index 388cece0b8..1283460cc9 100644
self.stream = stream

--
-2.32.0
+2.33.0

diff --git a/http/firefox/patches/0009-bmo-1516803-Fix-building-sandbox.patch
b/http/firefox/patches/0009-bmo-1516803-Fix-building-sandbox.patch
index 129077b..c5e0b82 100644
--- a/http/firefox/patches/0009-bmo-1516803-Fix-building-sandbox.patch
+++ b/http/firefox/patches/0009-bmo-1516803-Fix-building-sandbox.patch
@@ -1,7 +1,7 @@
-From c4496eba832e0a48b07ea59ac1bd4283a1cc9e92 Mon Sep 17 00:00:00 2001
+From 32c8e49636c9a0c8a06166cb684f123d24afda27 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Mon, 6 Apr 2020 19:44:28 +0200
-Subject: [PATCH 09/35] bmo#1516803: Fix building sandbox
+Subject: [PATCH 09/33] bmo#1516803: Fix building sandbox

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516803
Bug: https://bugs.gentoo.org/666580
@@ -24,5 +24,5 @@ index 29b53f12f7..31d2e24118 100644
DEFINES["NS_NO_XPCOM"] = True
DisableStlWrapping()
--
-2.32.0
+2.33.0

diff --git
a/http/firefox/patches/0010-Fix-building-spellchecker-when-using-GCC-and-PGO.patch

b/http/firefox/patches/0010-Fix-building-spellchecker-when-using-GCC-and-PGO.patch
index 4438778..1b59f0a 100644
---
a/http/firefox/patches/0010-Fix-building-spellchecker-when-using-GCC-and-PGO.patch
+++
b/http/firefox/patches/0010-Fix-building-spellchecker-when-using-GCC-and-PGO.patch
@@ -1,7 +1,7 @@
-From bb62a4e00289f65e51cd6169379814c663cdfca3 Mon Sep 17 00:00:00 2001
+From c4db4f4324788d5dd48d16ca097f96a04224cf51 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi AT gentoo.org>
Date: Mon, 6 Apr 2020 19:51:22 +0200
-Subject: [PATCH 10/35] Fix building spellchecker when using GCC and PGO
+Subject: [PATCH 10/33] Fix building spellchecker when using GCC and PGO

Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88561
Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
@@ -23,5 +23,5 @@ index dcc1d54f74..06a2ad5a15 100644
+if CONFIG["CC_TYPE"] in ("gcc"):
+ CXXFLAGS += ["-fno-devirtualize"]
--
-2.32.0
+2.33.0

diff --git
a/http/firefox/patches/0011-bmo-1526653-Include-struct-definitions-for-user_vfp-.patch

b/http/firefox/patches/0011-bmo-1526653-Include-struct-definitions-for-user_vfp-.patch
deleted file mode 100644
index ac919e1..0000000
---
a/http/firefox/patches/0011-bmo-1526653-Include-struct-definitions-for-user_vfp-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From c13fcf3d04d31fadebdd78e482bc1be023b9905f Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 6 Apr 2020 19:57:42 +0200
-Subject: [PATCH 11/35] bmo#1526653: Include struct definitions for user_vfp
- and user_vfp_exc
-
-Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1526653
-Bug: https://bugs.gentoo.org/681036
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/js/src/wasm/WasmSignalHandlers.cpp
b/js/src/wasm/WasmSignalHandlers.cpp
-index 37bc5a9c19..67b43ada29 100644
---- a/js/src/wasm/WasmSignalHandlers.cpp
-+++ b/js/src/wasm/WasmSignalHandlers.cpp
-@@ -252,7 +252,16 @@ using mozilla::DebugOnly;
- #endif
-
- #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
--# include <sys/user.h>
-+struct user_vfp {
-+ unsigned long long fpregs[32];
-+ unsigned long fpscr;
-+};
-+
-+struct user_vfp_exc {
-+ unsigned long fpexc;
-+ unsigned long fpinst;
-+ unsigned long fpinst2;
-+};
- #endif
-
- #if defined(ANDROID)
---
-2.32.0
-
diff --git
a/http/firefox/patches/0012-musl-Add-alternate-name-for-private-siginfo-struct-m.patch

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

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

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

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

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

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

b/http/firefox/patches/0016-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
new file mode 100644
index 0000000..cb67929
--- /dev/null
+++
b/http/firefox/patches/0016-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
@@ -0,0 +1,28 @@
+From dd6673f8a31205daa52866207bb80fbf35808e01 Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:10:47 +0200
+Subject: [PATCH 16/33] musl: getcontext is only avaliable on glibc systems
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ tools/profiler/core/platform-linux-android.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tools/profiler/core/platform-linux-android.cpp
b/tools/profiler/core/platform-linux-android.cpp
+index a99cbfe617..b12b6de93a 100644
+--- a/tools/profiler/core/platform-linux-android.cpp
++++ b/tools/profiler/core/platform-linux-android.cpp
+@@ -617,8 +617,10 @@ static void PlatformInit(PSLockRef aLock) {}
+ ucontext_t sSyncUContext;
+
+ void Registers::SyncPopulate() {
++#if defined(__GLIBC__)
+ if (!getcontext(&sSyncUContext)) {
+ PopulateRegsFromContext(*this, &sSyncUContext);
+ }
++#endif
+ }
+ #endif
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0017-musl-getcontext-is-only-avaliable-on-glibc-systems.patch

b/http/firefox/patches/0017-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
deleted file mode 100644
index e081335..0000000
---
a/http/firefox/patches/0017-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 486b2c5cf0df0b905a64897c86e42f5e2e4d99bd Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:10:47 +0200
-Subject: [PATCH 17/35] musl: getcontext is only avaliable on glibc systems
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- tools/profiler/core/platform-linux-android.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tools/profiler/core/platform-linux-android.cpp
b/tools/profiler/core/platform-linux-android.cpp
-index 0c800ef463..a0ff40e019 100644
---- a/tools/profiler/core/platform-linux-android.cpp
-+++ b/tools/profiler/core/platform-linux-android.cpp
-@@ -613,8 +613,10 @@ static void PlatformInit(PSLockRef aLock) {}
- ucontext_t sSyncUContext;
-
- void Registers::SyncPopulate() {
-+#if defined(__GLIBC__)
- if (!getcontext(&sSyncUContext)) {
- PopulateRegsFromContext(*this, &sSyncUContext);
- }
-+#endif
- }
- #endif
---
-2.32.0
-
diff --git
a/http/firefox/patches/0017-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch

b/http/firefox/patches/0017-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
new file mode 100644
index 0000000..65c65c5
--- /dev/null
+++
b/http/firefox/patches/0017-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
@@ -0,0 +1,48 @@
+From a9473f80be1c87d38d98994f6533f33df30752b2 Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:12:09 +0200
+Subject: [PATCH 17/33] musl: sys/auvx.h avaliable on more then just glibc
+ systems
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ .../webrtc/system_wrappers/source/cpu_features_linux.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git
a/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
b/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
+index 9c5645068a..05fea37ee0 100644
+---
a/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
++++
b/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
+@@ -11,10 +11,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <features.h>
+-#ifndef __GLIBC_PREREQ
+-#define __GLIBC_PREREQ(a, b) 0
+-#endif
+-#if __GLIBC_PREREQ(2, 16)
++#if defined(__linux__)
+ #include <sys/auxv.h>
+ #else
+ #include <fcntl.h>
+@@ -32,7 +29,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) {
+ int architecture = 0;
+ unsigned long hwcap = 0;
+ const char* platform = NULL;
+-#if __GLIBC_PREREQ(2, 16)
++#if defined(__linux__)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
+@@ -56,7 +53,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) {
+ }
+ close(fd);
+ }
+-#endif // __GLIBC_PREREQ(2,16)
++#endif // (__linux__)
+ #if defined(__aarch64__)
+ architecture = 8;
+ if ((hwcap & HWCAP_FP) != 0)
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0018-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

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

b/http/firefox/patches/0018-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
deleted file mode 100644
index 571adac..0000000
---
a/http/firefox/patches/0018-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From ea16f90f0bc7809ee3c0213e7e4a4e52c199ea4d Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:12:09 +0200
-Subject: [PATCH 18/35] musl: sys/auvx.h avaliable on more then just glibc
- systems
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- .../webrtc/system_wrappers/source/cpu_features_linux.c | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
-
-diff --git
a/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
b/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
-index 9c5645068a..05fea37ee0 100644
----
a/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
-+++
b/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c
-@@ -11,10 +11,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <features.h>
--#ifndef __GLIBC_PREREQ
--#define __GLIBC_PREREQ(a, b) 0
--#endif
--#if __GLIBC_PREREQ(2, 16)
-+#if defined(__linux__)
- #include <sys/auxv.h>
- #else
- #include <fcntl.h>
-@@ -32,7 +29,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) {
- int architecture = 0;
- unsigned long hwcap = 0;
- const char* platform = NULL;
--#if __GLIBC_PREREQ(2, 16)
-+#if defined(__linux__)
- hwcap = getauxval(AT_HWCAP);
- platform = (const char*)getauxval(AT_PLATFORM);
- #else
-@@ -56,7 +53,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) {
- }
- close(fd);
- }
--#endif // __GLIBC_PREREQ(2,16)
-+#endif // (__linux__)
- #if defined(__aarch64__)
- architecture = 8;
- if ((hwcap & HWCAP_FP) != 0)
---
-2.32.0
-
diff --git
a/http/firefox/patches/0019-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch

b/http/firefox/patches/0019-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
new file mode 100644
index 0000000..6d833ed
--- /dev/null
+++
b/http/firefox/patches/0019-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
@@ -0,0 +1,27 @@
+From 001107805aef79db0b9fa4cc3c00f0c293687a23 Mon Sep 17 00:00:00 2001
+From: Rasmus Thomsen <oss AT cogitri.dev>
+Date: Wed, 28 Oct 2020 17:50:24 +0100
+Subject: [PATCH 19/33] musl: include net/if.h before linux/if.h to avoid
+ redefinition
+
+Bug: https://bugs.gentoo.org/751469
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ .../webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git
a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
+index 73e85c6ccc..9eca548638 100644
+--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
+@@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
+ */
+
+ #if defined(LINUX)
++#include <net/if.h>
+ #include "addrs-netlink.h"
+ #include <csi_platform.h>
+ #include <assert.h>
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0019-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

b/http/firefox/patches/0019-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
deleted file mode 100644
index 2fa10f2..0000000
---
a/http/firefox/patches/0019-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 1d230c3955140ec3ad0420270572a381814fd4d5 Mon Sep 17 00:00:00 2001
-From: Johannes <johannes.brechtmann AT gmail.com>
-Date: Fri, 1 May 2020 17:20:29 +0200
-Subject: [PATCH 19/35] musl: make SYS_fork non-fatal, musl uses it for
fork(2)
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/linux/SandboxFilter.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
-index 6b07186e8c..a4b69b08cf 100644
---- a/security/sandbox/linux/SandboxFilter.cpp
-+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -1506,6 +1506,10 @@ class ContentSandboxPolicy : public
SandboxPolicyCommon {
- // usually do something reasonable on error.
- case __NR_clone:
- return ClonePolicy(Error(EPERM));
-+# ifdef __NR_fork
-+ case __NR_fork:
-+ return Error(ENOSYS);
-+# endif
-
- case __NR_clone3:
- return Error(ENOSYS);
---
-2.32.0
-
diff --git a/http/firefox/patches/0020-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0020-Make-PGO-use-toolchain.patch
new file mode 100644
index 0000000..6255a10
--- /dev/null
+++ b/http/firefox/patches/0020-Make-PGO-use-toolchain.patch
@@ -0,0 +1,33 @@
+From 040d055b6755bc71d9b65a4dde19ba16d8f1b160 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 20/33] 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 3927dd907b..cb4819b230 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.33.0
+
diff --git
a/http/firefox/patches/0020-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch

b/http/firefox/patches/0020-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
deleted file mode 100644
index a057f9b..0000000
---
a/http/firefox/patches/0020-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From aef14ba62a0b721b25d7210aa02eb263edefb715 Mon Sep 17 00:00:00 2001
-From: Rasmus Thomsen <oss AT cogitri.dev>
-Date: Wed, 28 Oct 2020 17:50:24 +0100
-Subject: [PATCH 20/35] musl: include net/if.h before linux/if.h to avoid
- redefinition
-
-Bug: https://bugs.gentoo.org/751469
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- .../webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git
a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
-index 73e85c6ccc..9eca548638 100644
---- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
-+++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c
-@@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
- */
-
- #if defined(LINUX)
-+#include <net/if.h>
- #include "addrs-netlink.h"
- #include <csi_platform.h>
- #include <assert.h>
---
-2.32.0
-
diff --git a/http/firefox/patches/0021-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0021-Make-PGO-use-toolchain.patch
deleted file mode 100644
index a4b6c41..0000000
--- a/http/firefox/patches/0021-Make-PGO-use-toolchain.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 96bdef8f186842d2d0a60dbcf9ce3654fee3ef2d 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 21/35] 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 3927dd907b..cb4819b230 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.32.0
-
diff --git
a/http/firefox/patches/0021-bmo-1516081-Disable-watchdog-during-PGO-builds.patch

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

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

b/http/firefox/patches/0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
new file mode 100644
index 0000000..c0d181c
--- /dev/null
+++
b/http/firefox/patches/0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
@@ -0,0 +1,32 @@
+From d5771d9ec095fabe91075161edb1c20a2131253d Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Wed, 15 Apr 2020 00:27:25 +0200
+Subject: [PATCH 22/33] bmo#1516803: force one LTO partition for sandbox when
+ using GCC
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ security/sandbox/linux/moz.build | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
+index 31d2e24118..88d9a2dc6f 100644
+--- a/security/sandbox/linux/moz.build
++++ b/security/sandbox/linux/moz.build
+@@ -114,9 +114,10 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"):
+ # gcc lto likes to put the top level asm in syscall.cc in a different
partition
+ # from the function using it which breaks the build. Work around that by
+ # forcing there to be only one partition.
+-for f in CONFIG["OS_CXXFLAGS"]:
+- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
+- LDFLAGS += ["--param", "lto-partitions=1"]
++if CONFIG["CC_TYPE"] != "clang" and CONFIG["MOZ_LTO_LDFLAGS"] is not None:
++ for f in CONFIG["MOZ_LTO_LDFLAGS"]:
++ if f.startswith("-flto"):
++ LDFLAGS += ["--param", "lto-partitions=1"]
+
+ DEFINES["NS_NO_XPCOM"] = True
+ DisableStlWrapping()
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0023-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0023-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..f9c65e7
--- /dev/null
+++ b/http/firefox/patches/0023-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
@@ -0,0 +1,28 @@
+From a0a25d7d685219a6a05c83bd409c00f7b32a65bf Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:47:13 +0200
+Subject: [PATCH 23/33] bmo#1196777: Set GDK_FOCUS_CHANGE_MASK
+
+Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1196777
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ widget/gtk/nsWindow.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
+index f56822bd06..7f777302b8 100644
+--- a/widget/gtk/nsWindow.cpp
++++ b/widget/gtk/nsWindow.cpp
+@@ -162,7 +162,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTURE_MASK |
GDK_EXPOSURE_MASK |
+ 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;
+
+ #if !GTK_CHECK_VERSION(3, 22, 0)
+ typedef enum {
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0023-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch

b/http/firefox/patches/0023-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
deleted file mode 100644
index 0344f38..0000000
---
a/http/firefox/patches/0023-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 368fd44bdd018c696b74650e74306b3c357cfbe5 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Wed, 15 Apr 2020 00:27:25 +0200
-Subject: [PATCH 23/35] bmo#1516803: force one LTO partition for sandbox when
- using GCC
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/linux/moz.build | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
-index 31d2e24118..88d9a2dc6f 100644
---- a/security/sandbox/linux/moz.build
-+++ b/security/sandbox/linux/moz.build
-@@ -114,9 +114,10 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"):
- # gcc lto likes to put the top level asm in syscall.cc in a different
partition
- # from the function using it which breaks the build. Work around that by
- # forcing there to be only one partition.
--for f in CONFIG["OS_CXXFLAGS"]:
-- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
-- LDFLAGS += ["--param", "lto-partitions=1"]
-+if CONFIG["CC_TYPE"] != "clang" and CONFIG["MOZ_LTO_LDFLAGS"] is not None:
-+ for f in CONFIG["MOZ_LTO_LDFLAGS"]:
-+ if f.startswith("-flto"):
-+ LDFLAGS += ["--param", "lto-partitions=1"]
-
- DEFINES["NS_NO_XPCOM"] = True
- DisableStlWrapping()
---
-2.32.0
-
diff --git
a/http/firefox/patches/0024-Fix-building-with-PGO-when-using-GCC.patch
b/http/firefox/patches/0024-Fix-building-with-PGO-when-using-GCC.patch
new file mode 100644
index 0000000..85a59a3
--- /dev/null
+++ b/http/firefox/patches/0024-Fix-building-with-PGO-when-using-GCC.patch
@@ -0,0 +1,84 @@
+From 370782ffe7679d7ebd81b18e8a9fbf727b1d02f5 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Thu, 2 Jul 2020 18:05:03 +0200
+Subject: [PATCH 24/33] Fix building with PGO when using GCC
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ build/moz.configure/lto-pgo.configure | 5 +++--
+ build/pgo/profileserver.py | 26 ++++++++++++++++++++++----
+ 2 files changed, 25 insertions(+), 6 deletions(-)
+
+diff --git a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
+index 30b8b27fc4..95852d7c21 100644
+--- a/build/moz.configure/lto-pgo.configure
++++ b/build/moz.configure/lto-pgo.configure
+@@ -84,11 +84,12 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
+ @imports(_from="__builtin__", _import="min")
+ def pgo_flags(compiler, profdata, target_is_windows):
+ if compiler.type == "gcc":
++ profile_use = "-fprofile-use"
+ return namespace(
+ gen_cflags=["-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"],
+ gen_ldflags=["-fprofile-generate"],
+- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
+- use_ldflags=["-fprofile-use"],
++ use_cflags=[profile_use, "-fprofile-correction",
"-Wcoverage-mismatch"],
++ use_ldflags=[profile_use],
+ )
+
+ if compiler.type in ("clang-cl", "clang"):
+diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
+index 7f3de106ab..89289a7756 100755
+--- a/build/pgo/profileserver.py
++++ b/build/pgo/profileserver.py
+@@ -11,7 +11,7 @@ import glob
+ import subprocess
+
+ import mozcrash
+-from mozbuild.base import MozbuildObject, BinaryNotFoundException
++from mozbuild.base import MozbuildObject, BinaryNotFoundException,
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
+@@ -212,6 +225,11 @@ if __name__ == "__main__":
+ print("Firefox exited successfully, but produced a crashreport")
+ sys.exit(1)
+
++ if using_gcc:
++ print("Copying profile data...")
++ os.system("pwd");
++ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd
..; tar xf instrumented/profdata.tar.gz;');
++
+ llvm_profdata = env.get("LLVM_PROFDATA")
+ if llvm_profdata:
+ profraw_files = glob.glob("*.profraw")
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0024-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0024-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 46c58c3..0000000
--- a/http/firefox/patches/0024-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c86d8f2b110b569e753a391104a3a58d46aa8a2a Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 6 Apr 2020 20:47:13 +0200
-Subject: [PATCH 24/35] bmo#1196777: Set GDK_FOCUS_CHANGE_MASK
-
-Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1196777
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- widget/gtk/nsWindow.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
-index ba4661b02a..7d4c6eed92 100644
---- a/widget/gtk/nsWindow.cpp
-+++ b/widget/gtk/nsWindow.cpp
-@@ -162,7 +162,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTURE_MASK |
GDK_EXPOSURE_MASK |
- 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;
-
- #if !GTK_CHECK_VERSION(3, 22, 0)
- typedef enum {
---
-2.32.0
-
diff --git
a/http/firefox/patches/0025-Fix-building-with-PGO-when-using-GCC.patch
b/http/firefox/patches/0025-Fix-building-with-PGO-when-using-GCC.patch
deleted file mode 100644
index 7f88c07..0000000
--- a/http/firefox/patches/0025-Fix-building-with-PGO-when-using-GCC.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From e34896beac605257bb8f9778da7fefb7a628880d Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Thu, 2 Jul 2020 18:05:03 +0200
-Subject: [PATCH 25/35] Fix building with PGO when using GCC
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/moz.configure/lto-pgo.configure | 5 +++--
- build/pgo/profileserver.py | 26 ++++++++++++++++++++++----
- 2 files changed, 25 insertions(+), 6 deletions(-)
-
-diff --git a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
-index 30b8b27fc4..95852d7c21 100644
---- a/build/moz.configure/lto-pgo.configure
-+++ b/build/moz.configure/lto-pgo.configure
-@@ -84,11 +84,12 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
- @imports(_from="__builtin__", _import="min")
- def pgo_flags(compiler, profdata, target_is_windows):
- if compiler.type == "gcc":
-+ profile_use = "-fprofile-use"
- return namespace(
- gen_cflags=["-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"],
- gen_ldflags=["-fprofile-generate"],
-- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
-- use_ldflags=["-fprofile-use"],
-+ use_cflags=[profile_use, "-fprofile-correction",
"-Wcoverage-mismatch"],
-+ use_ldflags=[profile_use],
- )
-
- if compiler.type in ("clang-cl", "clang"):
-diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
-index 7f3de106ab..89289a7756 100755
---- a/build/pgo/profileserver.py
-+++ b/build/pgo/profileserver.py
-@@ -11,7 +11,7 @@ import glob
- import subprocess
-
- import mozcrash
--from mozbuild.base import MozbuildObject, BinaryNotFoundException
-+from mozbuild.base import MozbuildObject, BinaryNotFoundException,
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
-@@ -212,6 +225,11 @@ if __name__ == "__main__":
- print("Firefox exited successfully, but produced a crashreport")
- sys.exit(1)
-
-+ if using_gcc:
-+ print("Copying profile data...")
-+ os.system("pwd");
-+ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd
..; tar xf instrumented/profdata.tar.gz;');
-+
- llvm_profdata = env.get("LLVM_PROFDATA")
- if llvm_profdata:
- profraw_files = glob.glob("*.profraw")
---
-2.32.0
-
diff --git
a/http/firefox/patches/0025-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0025-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
new file mode 100644
index 0000000..d1a8b22
--- /dev/null
+++
b/http/firefox/patches/0025-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
@@ -0,0 +1,28 @@
+From a4e51488bd2e1d7923f3ad703ada25ace7a410e6 Mon Sep 17 00:00:00 2001
+From: Mike Hommey <mh AT glandium.org>
+Date: Mon, 26 Nov 2018 09:59:56 +0900
+Subject: [PATCH 25/33] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
+ libaom neon code
+
+Bug: https://bugs.gentoo.org/730606
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ media/libaom/moz.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index fd8c7f2b33..db3f9ca6ec 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
+--
+2.33.0
+
diff --git a/http/firefox/patches/0026-build-Disable-Werror.patch
b/http/firefox/patches/0026-build-Disable-Werror.patch
new file mode 100644
index 0000000..e79887c
--- /dev/null
+++ b/http/firefox/patches/0026-build-Disable-Werror.patch
@@ -0,0 +1,28 @@
+From 7c5df289bd8c303f48ccbb945a1d4514e5ba51cb Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Sat, 29 Aug 2020 22:06:15 +0200
+Subject: [PATCH 26/33] build: Disable -Werror
+
+Bug: https://bugzilla.mozilla.org/822978
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ build/moz.configure/warnings.configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
+index 192f9574fe..2020d65ffc 100755
+--- a/build/moz.configure/warnings.configure
++++ b/build/moz.configure/warnings.configure
+@@ -215,7 +215,8 @@ with only_when(depends(target)(lambda t: t.kernel ==
"WINNT")):
+ check_and_add_gcc_warning("-Wno-gnu-zero-variadic-macro-arguments")
+
+ # Make it an error to be missing function declarations for C code.
+-check_and_add_gcc_warning("-Werror=implicit-function-declaration",
c_compiler)
++check_and_add_gcc_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_gcc_warning("-Wno-psabi")
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0026-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0026-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
deleted file mode 100644
index 144cd2e..0000000
---
a/http/firefox/patches/0026-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8dd947f8ed85699d6dcbcf28e8bcfc15b3d3036c Mon Sep 17 00:00:00 2001
-From: Mike Hommey <mh AT glandium.org>
-Date: Mon, 26 Nov 2018 09:59:56 +0900
-Subject: [PATCH 26/35] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
- libaom neon code
-
-Bug: https://bugs.gentoo.org/730606
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- media/libaom/moz.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/media/libaom/moz.build b/media/libaom/moz.build
-index fd8c7f2b33..db3f9ca6ec 100644
---- a/media/libaom/moz.build
-+++ b/media/libaom/moz.build
-@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
-
- for f in SOURCES:
- if f.endswith('neon.c'):
-- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
-+ SOURCES[f].flags += CONFIG['NEON_FLAGS']
-
- if CONFIG['OS_TARGET'] == 'Android':
- # For cpu-features.h
---
-2.32.0
-
diff --git
a/http/firefox/patches/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..ef68cd5
--- /dev/null
+++
b/http/firefox/patches/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
@@ -0,0 +1,34 @@
+From 8867ab47e2ccd99dd21bb6bc538389e7585a5627 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 27/33] 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 80a55e3c14..bd78cf1725 100644
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -64,6 +64,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
+@@ -77,6 +78,7 @@ RUSTFLAGS += -Cembed-bitcode=yes
+ endif
+ endif
+ endif
++endif
+
+ ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
+--
+2.33.0
+
diff --git a/http/firefox/patches/0027-build-Disable-Werror.patch
b/http/firefox/patches/0027-build-Disable-Werror.patch
deleted file mode 100644
index e7396b9..0000000
--- a/http/firefox/patches/0027-build-Disable-Werror.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 97414f276a2ee021c97c46fc41584d22a9d5a792 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Sat, 29 Aug 2020 22:06:15 +0200
-Subject: [PATCH 27/35] build: Disable -Werror
-
-Bug: https://bugzilla.mozilla.org/822978
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/moz.configure/warnings.configure | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
-index 192f9574fe..2020d65ffc 100755
---- a/build/moz.configure/warnings.configure
-+++ b/build/moz.configure/warnings.configure
-@@ -215,7 +215,8 @@ with only_when(depends(target)(lambda t: t.kernel ==
"WINNT")):
- check_and_add_gcc_warning("-Wno-gnu-zero-variadic-macro-arguments")
-
- # Make it an error to be missing function declarations for C code.
--check_and_add_gcc_warning("-Werror=implicit-function-declaration",
c_compiler)
-+check_and_add_gcc_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_gcc_warning("-Wno-psabi")
---
-2.32.0
-
diff --git
a/http/firefox/patches/0028-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0028-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
deleted file mode 100644
index 1488fee..0000000
---
a/http/firefox/patches/0028-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From c827acda5f8e2ff0794bbbe88137a75c653d55a6 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 28/35] 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 49d25655b1..b3ac4763c7 100644
---- a/config/makefiles/rust.mk
-+++ b/config/makefiles/rust.mk
-@@ -64,6 +64,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
-@@ -77,6 +78,7 @@ RUSTFLAGS += -Cembed-bitcode=yes
- endif
- endif
- endif
-+endif
-
- ifdef CARGO_INCREMENTAL
- export CARGO_INCREMENTAL
---
-2.32.0
-
diff --git a/http/firefox/patches/0028-Make-elfhack-use-toolchain.patch
b/http/firefox/patches/0028-Make-elfhack-use-toolchain.patch
new file mode 100644
index 0000000..6c2b5b2
--- /dev/null
+++ b/http/firefox/patches/0028-Make-elfhack-use-toolchain.patch
@@ -0,0 +1,26 @@
+From 2170ee3acc3b81cd8b1b2fc6794a4dfcad8b2297 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Mon, 28 Sep 2020 20:52:24 +0200
+Subject: [PATCH 28/33] Make elfhack use toolchain
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ build/unix/elfhack/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/unix/elfhack/Makefile.in b/build/unix/elfhack/Makefile.in
+index 08cc3d6852..c2b575d87a 100644
+--- a/build/unix/elfhack/Makefile.in
++++ b/build/unix/elfhack/Makefile.in
+@@ -20,7 +20,7 @@ test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX):
%$(DLL_SUFFIX): %.$(OBJ_SUFFIX)
+ # Fail if the backup file doesn't exist
+ [ -f '$@.bak' ]
+ # Fail if the new library doesn't contain less relocations
+- [ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt $$(objdump -R
$@ | wc -l) ]
++ [ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt
$$($(TOOLCHAIN_PREFIX)objdump -R $@ | wc -l) ]
+
+ test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): DSO_SONAME=$@
+ test-array$(DLL_SUFFIX): DT_TYPE=INIT_ARRAY
+--
+2.33.0
+
diff --git a/http/firefox/patches/0029-Disable-FFVPX-with-VA-API.patch
b/http/firefox/patches/0029-Disable-FFVPX-with-VA-API.patch
new file mode 100644
index 0000000..95310ea
--- /dev/null
+++ b/http/firefox/patches/0029-Disable-FFVPX-with-VA-API.patch
@@ -0,0 +1,91 @@
+From 393cfd1e73e36540d10e91f8f028000b64c5d98d Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Thu, 29 Apr 2021 18:22:48 +0200
+Subject: [PATCH 29/33] Disable FFVPX with VA-API
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ dom/media/platforms/PDMFactory.cpp | 32 +++++++++++++++---------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/dom/media/platforms/PDMFactory.cpp
b/dom/media/platforms/PDMFactory.cpp
+index 6e84abde70..fab21747f5 100644
+--- a/dom/media/platforms/PDMFactory.cpp
++++ b/dom/media/platforms/PDMFactory.cpp
+@@ -481,12 +481,6 @@ void PDMFactory::CreateRddPDMs() {
+ CreateAndStartupPDM<AppleDecoderModule>();
+ }
+ #endif
+-#ifdef MOZ_FFVPX
+- if (StaticPrefs::media_ffvpx_enabled() &&
+- StaticPrefs::media_rdd_ffvpx_enabled()) {
+- CreateAndStartupPDM<FFVPXRuntimeLinker>();
+- }
+-#endif
+ #ifdef MOZ_FFMPEG
+ if (StaticPrefs::media_ffmpeg_enabled() &&
+ StaticPrefs::media_rdd_ffmpeg_enabled() &&
+@@ -494,6 +488,12 @@ void PDMFactory::CreateRddPDMs() {
+ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
+ FFmpegRuntimeLinker::LinkStatusCode());
+ }
++#endif
++#ifdef MOZ_FFVPX
++ if (StaticPrefs::media_ffvpx_enabled() &&
++ StaticPrefs::media_rdd_ffvpx_enabled()) {
++ CreateAndStartupPDM<FFVPXRuntimeLinker>();
++ }
+ #endif
+ CreateAndStartupPDM<AgnosticDecoderModule>();
+ }
+@@ -525,11 +525,6 @@ void PDMFactory::CreateContentPDMs() {
+ CreateAndStartupPDM<OmxDecoderModule>();
+ }
+ #endif
+-#ifdef MOZ_FFVPX
+- if (StaticPrefs::media_ffvpx_enabled()) {
+- CreateAndStartupPDM<FFVPXRuntimeLinker>();
+- }
+-#endif
+ #ifdef MOZ_FFMPEG
+ if (StaticPrefs::media_ffmpeg_enabled() &&
+ !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
+@@ -537,6 +532,11 @@ void PDMFactory::CreateContentPDMs() {
+ FFmpegRuntimeLinker::LinkStatusCode());
+ }
+ #endif
++#ifdef MOZ_FFVPX
++ if (StaticPrefs::media_ffvpx_enabled()) {
++ CreateAndStartupPDM<FFVPXRuntimeLinker>();
++ }
++#endif
+ #ifdef MOZ_WIDGET_ANDROID
+ if (StaticPrefs::media_android_media_codec_enabled()) {
+ StartupPDM(AndroidDecoderModule::Create(),
+@@ -571,11 +571,6 @@ void PDMFactory::CreateDefaultPDMs() {
+ CreateAndStartupPDM<OmxDecoderModule>();
+ }
+ #endif
+-#ifdef MOZ_FFVPX
+- if (StaticPrefs::media_ffvpx_enabled()) {
+- CreateAndStartupPDM<FFVPXRuntimeLinker>();
+- }
+-#endif
+ #ifdef MOZ_FFMPEG
+ if (StaticPrefs::media_ffmpeg_enabled() &&
+ !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
+@@ -583,6 +578,11 @@ void PDMFactory::CreateDefaultPDMs() {
+ FFmpegRuntimeLinker::LinkStatusCode());
+ }
+ #endif
++#ifdef MOZ_FFVPX
++ if (StaticPrefs::media_ffvpx_enabled()) {
++ CreateAndStartupPDM<FFVPXRuntimeLinker>();
++ }
++#endif
+ #ifdef MOZ_WIDGET_ANDROID
+ if (StaticPrefs::media_android_media_codec_enabled()) {
+ StartupPDM(AndroidDecoderModule::Create(),
+--
+2.33.0
+
diff --git a/http/firefox/patches/0029-Make-elfhack-use-toolchain.patch
b/http/firefox/patches/0029-Make-elfhack-use-toolchain.patch
deleted file mode 100644
index 38839ba..0000000
--- a/http/firefox/patches/0029-Make-elfhack-use-toolchain.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 6d3361599f9d237174cc5ea0ab48cabfb1f4d7ad Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Mon, 28 Sep 2020 20:52:24 +0200
-Subject: [PATCH 29/35] Make elfhack use toolchain
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/unix/elfhack/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/unix/elfhack/Makefile.in b/build/unix/elfhack/Makefile.in
-index 08cc3d6852..c2b575d87a 100644
---- a/build/unix/elfhack/Makefile.in
-+++ b/build/unix/elfhack/Makefile.in
-@@ -20,7 +20,7 @@ test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX):
%$(DLL_SUFFIX): %.$(OBJ_SUFFIX)
- # Fail if the backup file doesn't exist
- [ -f '$@.bak' ]
- # Fail if the new library doesn't contain less relocations
-- [ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt $$(objdump -R
$@ | wc -l) ]
-+ [ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt
$$($(TOOLCHAIN_PREFIX)objdump -R $@ | wc -l) ]
-
- test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): DSO_SONAME=$@
- test-array$(DLL_SUFFIX): DT_TYPE=INIT_ARRAY
---
-2.32.0
-
diff --git a/http/firefox/patches/0030-Disable-FFVPX-with-VA-API.patch
b/http/firefox/patches/0030-Disable-FFVPX-with-VA-API.patch
deleted file mode 100644
index ad30be8..0000000
--- a/http/firefox/patches/0030-Disable-FFVPX-with-VA-API.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 135a2dad031d75640d92e6d49783e26971918688 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Thu, 29 Apr 2021 18:22:48 +0200
-Subject: [PATCH 30/35] Disable FFVPX with VA-API
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- dom/media/platforms/PDMFactory.cpp | 32 +++++++++++++++---------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/dom/media/platforms/PDMFactory.cpp
b/dom/media/platforms/PDMFactory.cpp
-index 6e84abde70..fab21747f5 100644
---- a/dom/media/platforms/PDMFactory.cpp
-+++ b/dom/media/platforms/PDMFactory.cpp
-@@ -481,12 +481,6 @@ void PDMFactory::CreateRddPDMs() {
- CreateAndStartupPDM<AppleDecoderModule>();
- }
- #endif
--#ifdef MOZ_FFVPX
-- if (StaticPrefs::media_ffvpx_enabled() &&
-- StaticPrefs::media_rdd_ffvpx_enabled()) {
-- CreateAndStartupPDM<FFVPXRuntimeLinker>();
-- }
--#endif
- #ifdef MOZ_FFMPEG
- if (StaticPrefs::media_ffmpeg_enabled() &&
- StaticPrefs::media_rdd_ffmpeg_enabled() &&
-@@ -494,6 +488,12 @@ void PDMFactory::CreateRddPDMs() {
- mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
- FFmpegRuntimeLinker::LinkStatusCode());
- }
-+#endif
-+#ifdef MOZ_FFVPX
-+ if (StaticPrefs::media_ffvpx_enabled() &&
-+ StaticPrefs::media_rdd_ffvpx_enabled()) {
-+ CreateAndStartupPDM<FFVPXRuntimeLinker>();
-+ }
- #endif
- CreateAndStartupPDM<AgnosticDecoderModule>();
- }
-@@ -525,11 +525,6 @@ void PDMFactory::CreateContentPDMs() {
- CreateAndStartupPDM<OmxDecoderModule>();
- }
- #endif
--#ifdef MOZ_FFVPX
-- if (StaticPrefs::media_ffvpx_enabled()) {
-- CreateAndStartupPDM<FFVPXRuntimeLinker>();
-- }
--#endif
- #ifdef MOZ_FFMPEG
- if (StaticPrefs::media_ffmpeg_enabled() &&
- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
-@@ -537,6 +532,11 @@ void PDMFactory::CreateContentPDMs() {
- FFmpegRuntimeLinker::LinkStatusCode());
- }
- #endif
-+#ifdef MOZ_FFVPX
-+ if (StaticPrefs::media_ffvpx_enabled()) {
-+ CreateAndStartupPDM<FFVPXRuntimeLinker>();
-+ }
-+#endif
- #ifdef MOZ_WIDGET_ANDROID
- if (StaticPrefs::media_android_media_codec_enabled()) {
- StartupPDM(AndroidDecoderModule::Create(),
-@@ -571,11 +571,6 @@ void PDMFactory::CreateDefaultPDMs() {
- CreateAndStartupPDM<OmxDecoderModule>();
- }
- #endif
--#ifdef MOZ_FFVPX
-- if (StaticPrefs::media_ffvpx_enabled()) {
-- CreateAndStartupPDM<FFVPXRuntimeLinker>();
-- }
--#endif
- #ifdef MOZ_FFMPEG
- if (StaticPrefs::media_ffmpeg_enabled() &&
- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
-@@ -583,6 +578,11 @@ void PDMFactory::CreateDefaultPDMs() {
- FFmpegRuntimeLinker::LinkStatusCode());
- }
- #endif
-+#ifdef MOZ_FFVPX
-+ if (StaticPrefs::media_ffvpx_enabled()) {
-+ CreateAndStartupPDM<FFVPXRuntimeLinker>();
-+ }
-+#endif
- #ifdef MOZ_WIDGET_ANDROID
- if (StaticPrefs::media_android_media_codec_enabled()) {
- StartupPDM(AndroidDecoderModule::Create(),
---
-2.32.0
-
diff --git
a/http/firefox/patches/0030-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0030-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 0000000..4008102
--- /dev/null
+++
b/http/firefox/patches/0030-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
@@ -0,0 +1,36 @@
+From 7134ac92ab0e5ec45470c45b617d233ecd487d21 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Thu, 29 Apr 2021 18:48:06 +0200
+Subject: [PATCH 30/33] Enable FLAC on platforms without ffvpx via ffmpeg
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ dom/media/flac/FlacDecoder.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/dom/media/flac/FlacDecoder.cpp b/dom/media/flac/FlacDecoder.cpp
+index 2f205c9aae..68847b0952 100644
+--- 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);
+ #else
+ return false;
+ #endif
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0031-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0031-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
deleted file mode 100644
index 63dcb19..0000000
---
a/http/firefox/patches/0031-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 2076e89dbbee44b08a68bd1df497f0c5d078dd7f Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Thu, 29 Apr 2021 18:48:06 +0200
-Subject: [PATCH 31/35] Enable FLAC on platforms without ffvpx via ffmpeg
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- dom/media/flac/FlacDecoder.cpp | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/dom/media/flac/FlacDecoder.cpp b/dom/media/flac/FlacDecoder.cpp
-index 2f205c9aae..68847b0952 100644
---- 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);
- #else
- return false;
- #endif
---
-2.32.0
-
diff --git
a/http/firefox/patches/0031-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch

b/http/firefox/patches/0031-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
new file mode 100644
index 0000000..410aff4
--- /dev/null
+++
b/http/firefox/patches/0031-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
@@ -0,0 +1,96 @@
+From 9aa7b8db9e54663cc4ee3ec996c2d03ada859cc3 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Fri, 11 Dec 2020 15:37:38 +0100
+Subject: [PATCH 31/33] bmo#1670333: OpenH264: Fix decoding if it starts on
non
+ IDR I-frame
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ dom/media/mp4/MP4Demuxer.cpp | 8 ++++++++
+ dom/media/platforms/PDMFactory.cpp | 15 ++++++++++-----
+ dom/media/platforms/PDMFactory.h | 2 ++
+ 3 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/dom/media/mp4/MP4Demuxer.cpp b/dom/media/mp4/MP4Demuxer.cpp
+index 59bba16577..0304e3e89f 100644
+--- a/dom/media/mp4/MP4Demuxer.cpp
++++ b/dom/media/mp4/MP4Demuxer.cpp
+@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { return
gMediaDemuxerLog; }
+ DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \
+ __func__, ##__VA_ARGS__)
+
++extern bool gUseKeyframeFromContainer;
++
+ namespace mozilla {
+
+ DDLoggedTypeDeclNameAndBase(MP4TrackDemuxer, MediaTrackDemuxer);
+@@ -394,6 +396,12 @@ already_AddRefed<MediaRawData>
MP4TrackDemuxer::GetNextSample() {
+ [[fallthrough]];
+ case H264::FrameType::OTHER: {
+ bool keyframe = type == H264::FrameType::I_FRAME;
++ if (gUseKeyframeFromContainer) {
++ if (sample->mKeyframe && sample->mKeyframe != keyframe) {
++ sample->mKeyframe = keyframe;
++ }
++ break;
++ }
+ if (sample->mKeyframe != keyframe) {
+ NS_WARNING(nsPrintfCString("Frame incorrectly marked as
%skeyframe "
+ "@ pts:%" PRId64 " dur:%" PRId64
+diff --git a/dom/media/platforms/PDMFactory.cpp
b/dom/media/platforms/PDMFactory.cpp
+index fab21747f5..cceaa944aa 100644
+--- a/dom/media/platforms/PDMFactory.cpp
++++ b/dom/media/platforms/PDMFactory.cpp
+@@ -58,6 +58,8 @@
+
+ #include <functional>
+
++bool gUseKeyframeFromContainer = false;
++
+ namespace mozilla {
+
+ #define PDM_INIT_LOG(msg, ...) \
+@@ -526,10 +528,12 @@ void PDMFactory::CreateContentPDMs() {
+ }
+ #endif
+ #ifdef MOZ_FFMPEG
+- if (StaticPrefs::media_ffmpeg_enabled() &&
+- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
+- mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
+- FFmpegRuntimeLinker::LinkStatusCode());
++ if (StaticPrefs::media_ffmpeg_enabled()) {
++ mFFmpegUsed = CreateAndStartupPDM<FFmpegRuntimeLinker>();
++ if (!mFFmpegUsed) {
++ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
++ FFmpegRuntimeLinker::LinkStatusCode());
++ }
+ }
+ #endif
+ #ifdef MOZ_FFVPX
+@@ -546,8 +550,9 @@ void PDMFactory::CreateContentPDMs() {
+
+ CreateAndStartupPDM<AgnosticDecoderModule>();
+
+- if (StaticPrefs::media_gmp_decoder_enabled() &&
++ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed &&
+ !CreateAndStartupPDM<GMPDecoderModule>()) {
++ gUseKeyframeFromContainer = true;
+ mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup;
+ }
+ }
+diff --git a/dom/media/platforms/PDMFactory.h
b/dom/media/platforms/PDMFactory.h
+index 4fc81c0b37..72f3255b6f 100644
+--- a/dom/media/platforms/PDMFactory.h
++++ b/dom/media/platforms/PDMFactory.h
+@@ -122,6 +122,8 @@ class PDMFactory final {
+
+ DecoderDoctorDiagnostics::FlagsSet mFailureFlags;
+
++ bool mFFmpegUsed = false;
++
+ friend class RemoteVideoDecoderParent;
+ static void EnsureInit();
+ };
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0032-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch

b/http/firefox/patches/0032-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
new file mode 100644
index 0000000..9a1d1cf
--- /dev/null
+++
b/http/firefox/patches/0032-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
@@ -0,0 +1,55 @@
+From 3ff3e007201ddaa5ded50bbc32620d3ac9ccb4dd Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Fri, 11 Dec 2020 15:46:25 +0100
+Subject: [PATCH 32/33] bmo#1663844: OpenH264: Allow using OpenH264 GMP
decoder
+ as fallback for video decoding
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ dom/media/gmp/GMPSharedMemManager.h | 2 +-
+ dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp | 2 +-
+ dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp | 2 ++
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/dom/media/gmp/GMPSharedMemManager.h
b/dom/media/gmp/GMPSharedMemManager.h
+index 44c660f6ca..3a2eff3294 100644
+--- a/dom/media/gmp/GMPSharedMemManager.h
++++ b/dom/media/gmp/GMPSharedMemManager.h
+@@ -27,7 +27,7 @@ class GMPSharedMem {
+ // returned to the parent pool (which is not included). If more than
+ // this are needed, we presume the client has either crashed or hung
+ // (perhaps temporarily).
+- static const uint32_t kGMPBufLimit = 20;
++ static const uint32_t kGMPBufLimit = 40;
+
+ GMPSharedMem() {
+ for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
+diff --git a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
+index 641f52a58b..6bd8235073 100644
+--- a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
++++ b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
+@@ -82,7 +82,7 @@ bool GMPDecoderModule::SupportsMimeType(const nsACString&
aMimeType,
+
+ bool GMPDecoderModule::SupportsMimeType(
+ const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics)
const {
+- return false;
++ return MP4Decoder::IsH264(aMimeType);
+ }
+
+ /* static */
+diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
+index f1e2cf935b..406fd8a622 100644
+--- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
++++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
+@@ -68,6 +68,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi420Frame*
aDecodedFrame) {
+ RefPtr<GMPVideoDecoder> self = this;
+ if (v) {
+ mDecodedData.AppendElement(std::move(v));
++ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
++ mDecodedData = DecodedData();
+ } else {
+ mDecodedData.Clear();
+ mDecodePromise.RejectIfExists(
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0032-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch

b/http/firefox/patches/0032-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
deleted file mode 100644
index 4eac001..0000000
---
a/http/firefox/patches/0032-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 2314bea96fe6261b1606e2491c11e2c21fa53402 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Fri, 11 Dec 2020 15:37:38 +0100
-Subject: [PATCH 32/35] bmo#1670333: OpenH264: Fix decoding if it starts on
non
- IDR I-frame
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- dom/media/mp4/MP4Demuxer.cpp | 8 ++++++++
- dom/media/platforms/PDMFactory.cpp | 15 ++++++++++-----
- dom/media/platforms/PDMFactory.h | 2 ++
- 3 files changed, 20 insertions(+), 5 deletions(-)
-
-diff --git a/dom/media/mp4/MP4Demuxer.cpp b/dom/media/mp4/MP4Demuxer.cpp
-index 59bba16577..0304e3e89f 100644
---- a/dom/media/mp4/MP4Demuxer.cpp
-+++ b/dom/media/mp4/MP4Demuxer.cpp
-@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { return
gMediaDemuxerLog; }
- DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \
- __func__, ##__VA_ARGS__)
-
-+extern bool gUseKeyframeFromContainer;
-+
- namespace mozilla {
-
- DDLoggedTypeDeclNameAndBase(MP4TrackDemuxer, MediaTrackDemuxer);
-@@ -394,6 +396,12 @@ already_AddRefed<MediaRawData>
MP4TrackDemuxer::GetNextSample() {
- [[fallthrough]];
- case H264::FrameType::OTHER: {
- bool keyframe = type == H264::FrameType::I_FRAME;
-+ if (gUseKeyframeFromContainer) {
-+ if (sample->mKeyframe && sample->mKeyframe != keyframe) {
-+ sample->mKeyframe = keyframe;
-+ }
-+ break;
-+ }
- if (sample->mKeyframe != keyframe) {
- NS_WARNING(nsPrintfCString("Frame incorrectly marked as
%skeyframe "
- "@ pts:%" PRId64 " dur:%" PRId64
-diff --git a/dom/media/platforms/PDMFactory.cpp
b/dom/media/platforms/PDMFactory.cpp
-index fab21747f5..cceaa944aa 100644
---- a/dom/media/platforms/PDMFactory.cpp
-+++ b/dom/media/platforms/PDMFactory.cpp
-@@ -58,6 +58,8 @@
-
- #include <functional>
-
-+bool gUseKeyframeFromContainer = false;
-+
- namespace mozilla {
-
- #define PDM_INIT_LOG(msg, ...) \
-@@ -526,10 +528,12 @@ void PDMFactory::CreateContentPDMs() {
- }
- #endif
- #ifdef MOZ_FFMPEG
-- if (StaticPrefs::media_ffmpeg_enabled() &&
-- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
-- mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
-- FFmpegRuntimeLinker::LinkStatusCode());
-+ if (StaticPrefs::media_ffmpeg_enabled()) {
-+ mFFmpegUsed = CreateAndStartupPDM<FFmpegRuntimeLinker>();
-+ if (!mFFmpegUsed) {
-+ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
-+ FFmpegRuntimeLinker::LinkStatusCode());
-+ }
- }
- #endif
- #ifdef MOZ_FFVPX
-@@ -546,8 +550,9 @@ void PDMFactory::CreateContentPDMs() {
-
- CreateAndStartupPDM<AgnosticDecoderModule>();
-
-- if (StaticPrefs::media_gmp_decoder_enabled() &&
-+ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed &&
- !CreateAndStartupPDM<GMPDecoderModule>()) {
-+ gUseKeyframeFromContainer = true;
- mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup;
- }
- }
-diff --git a/dom/media/platforms/PDMFactory.h
b/dom/media/platforms/PDMFactory.h
-index 4fc81c0b37..72f3255b6f 100644
---- a/dom/media/platforms/PDMFactory.h
-+++ b/dom/media/platforms/PDMFactory.h
-@@ -122,6 +122,8 @@ class PDMFactory final {
-
- DecoderDoctorDiagnostics::FlagsSet mFailureFlags;
-
-+ bool mFFmpegUsed = false;
-+
- friend class RemoteVideoDecoderParent;
- static void EnsureInit();
- };
---
-2.32.0
-
diff --git
a/http/firefox/patches/0033-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch

b/http/firefox/patches/0033-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
deleted file mode 100644
index ebf38ed..0000000
---
a/http/firefox/patches/0033-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From d64fdb286abcfaaae209b64d15a9811ffdacc250 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Fri, 11 Dec 2020 15:46:25 +0100
-Subject: [PATCH 33/35] bmo#1663844: OpenH264: Allow using OpenH264 GMP
decoder
- as fallback for video decoding
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- dom/media/gmp/GMPSharedMemManager.h | 2 +-
- dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp | 2 +-
- dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp | 2 ++
- 3 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/dom/media/gmp/GMPSharedMemManager.h
b/dom/media/gmp/GMPSharedMemManager.h
-index 44c660f6ca..3a2eff3294 100644
---- a/dom/media/gmp/GMPSharedMemManager.h
-+++ b/dom/media/gmp/GMPSharedMemManager.h
-@@ -27,7 +27,7 @@ class GMPSharedMem {
- // returned to the parent pool (which is not included). If more than
- // this are needed, we presume the client has either crashed or hung
- // (perhaps temporarily).
-- static const uint32_t kGMPBufLimit = 20;
-+ static const uint32_t kGMPBufLimit = 40;
-
- GMPSharedMem() {
- for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
-diff --git a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
-index 641f52a58b..6bd8235073 100644
---- a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
-+++ b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
-@@ -82,7 +82,7 @@ bool GMPDecoderModule::SupportsMimeType(const nsACString&
aMimeType,
-
- bool GMPDecoderModule::SupportsMimeType(
- const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics)
const {
-- return false;
-+ return MP4Decoder::IsH264(aMimeType);
- }
-
- /* static */
-diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
-index 5019ff5a2d..4ee0ef4518 100644
---- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
-+++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
-@@ -68,6 +68,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi420Frame*
aDecodedFrame) {
- RefPtr<GMPVideoDecoder> self = this;
- if (v) {
- mDecodedData.AppendElement(std::move(v));
-+ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
-+ mDecodedData = DecodedData();
- } else {
- mDecodedData.Clear();
- mDecodePromise.RejectIfExists(
---
-2.32.0
-
diff --git
a/http/firefox/patches/0033-bmo-1728749-Pre-select-OS-dialog-when-using-Pipewire.patch

b/http/firefox/patches/0033-bmo-1728749-Pre-select-OS-dialog-when-using-Pipewire.patch
new file mode 100644
index 0000000..a41625a
--- /dev/null
+++
b/http/firefox/patches/0033-bmo-1728749-Pre-select-OS-dialog-when-using-Pipewire.patch
@@ -0,0 +1,30 @@
+From 551677fe23c758d4a045f32ea398f576b3285b60 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Mon, 6 Sep 2021 16:44:00 +0200
+Subject: [PATCH 33/33] bmo#1728749: Pre-select OS dialog when using Pipewire
+ for screen sharing
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ browser/actors/WebRTCParent.jsm | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/browser/actors/WebRTCParent.jsm
b/browser/actors/WebRTCParent.jsm
+index c28af6db1a..87b97671d6 100644
+--- a/browser/actors/WebRTCParent.jsm
++++ b/browser/actors/WebRTCParent.jsm
+@@ -870,6 +870,11 @@ function prompt(aActor, aBrowser, aRequest) {
+ );
+ item.deviceId = device.id;
+ item.mediaSource = type;
++
++ // In this case the OS sharing dialog will be the only option
and
++ // can be safely pre-selected.
++ menupopup.parentNode.selectedItem = item;
++ menupopup.parentNode.disabled = true;
+ break;
+ }
+ if (type == "application") {
+--
+2.33.0
+
diff --git
a/http/firefox/patches/0034-bmo-1721326-Allow-dynamic-PTHREAD_STACK_MIN.patch
b/http/firefox/patches/0034-bmo-1721326-Allow-dynamic-PTHREAD_STACK_MIN.patch
deleted file mode 100644
index 0531051..0000000
---
a/http/firefox/patches/0034-bmo-1721326-Allow-dynamic-PTHREAD_STACK_MIN.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 3626bb30aea10853c63830402470ecb3aa87a2c7 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Wed, 11 Aug 2021 02:22:11 +0200
-Subject: [PATCH 34/35] bmo#1721326: Allow dynamic PTHREAD_STACK_MIN
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- js/xpconnect/src/XPCJSContext.cpp | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/js/xpconnect/src/XPCJSContext.cpp
b/js/xpconnect/src/XPCJSContext.cpp
-index e37c2638ae..4ece7b9df3 100644
---- a/js/xpconnect/src/XPCJSContext.cpp
-+++ b/js/xpconnect/src/XPCJSContext.cpp
-@@ -86,13 +86,10 @@ using namespace mozilla;
- using namespace xpc;
- using namespace JS;
-
--// The watchdog thread loop is pretty trivial, and should not require much
stack
--// space to do its job. So only give it 32KiB or the platform minimum.
-+// We will clamp to reasonable values if this isn't set.
- #if !defined(PTHREAD_STACK_MIN)
- # define PTHREAD_STACK_MIN 0
- #endif
--static constexpr size_t kWatchdogStackSize =
-- PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN;
-
- static void WatchdogMain(void* arg);
- class Watchdog;
-@@ -159,12 +156,19 @@ class Watchdog {
- {
- AutoLockWatchdog lock(this);
-
-+ // The watchdog thread loop is pretty trivial, and should not
-+ // require much stack space to do its job. So only give it 32KiB
-+ // or the platform minimum. On modern Linux libc this might resolve to
-+ // a runtime call.
-+ size_t watchdogStackSize = PTHREAD_STACK_MIN;
-+ watchdogStackSize = std::max<size_t>(32 * 1024, watchdogStackSize);
-+
- // Gecko uses thread private for accounting and has to clean up at
thread
- // exit. Therefore, even though we don't have a return value from the
- // watchdog, we need to join it on shutdown.
- mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain, this,
- PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
-- PR_JOINABLE_THREAD, kWatchdogStackSize);
-+ PR_JOINABLE_THREAD, watchdogStackSize);
- if (!mThread) {
- MOZ_CRASH("PR_CreateThread failed!");
- }
---
-2.32.0
-
diff --git
a/http/firefox/patches/0035-bmo-1721326-Use-small-stack-for-DoClone.patch
b/http/firefox/patches/0035-bmo-1721326-Use-small-stack-for-DoClone.patch
deleted file mode 100644
index 1976e08..0000000
--- a/http/firefox/patches/0035-bmo-1721326-Use-small-stack-for-DoClone.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From f680cce1b77a598656f585c8c11e9a88425443ac Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Wed, 11 Aug 2021 02:22:26 +0200
-Subject: [PATCH 35/35] bmo#1721326: Use small stack for DoClone()
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- security/sandbox/linux/launch/SandboxLaunch.cpp | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/security/sandbox/linux/launch/SandboxLaunch.cpp
b/security/sandbox/linux/launch/SandboxLaunch.cpp
-index d55acbc1a5..c7f7acd8d1 100644
---- a/security/sandbox/linux/launch/SandboxLaunch.cpp
-+++ b/security/sandbox/linux/launch/SandboxLaunch.cpp
-@@ -509,8 +509,7 @@ static int CloneCallee(void* aPtr) {
- MOZ_NEVER_INLINE MOZ_ASAN_BLACKLIST static pid_t DoClone(int aFlags,
- jmp_buf* aCtx) {
- static constexpr size_t kStackAlignment = 16;
-- uint8_t miniStack[PTHREAD_STACK_MIN]
-- __attribute__((aligned(kStackAlignment)));
-+ uint8_t miniStack[4096] __attribute__((aligned(kStackAlignment)));
- #ifdef __hppa__
- void* stackPtr = miniStack;
- #else
-@@ -531,13 +530,19 @@ static pid_t ForkWithFlags(int aFlags) {
- CLONE_CHILD_CLEARTID;
- MOZ_RELEASE_ASSERT((aFlags & kBadFlags) == 0);
-
-+ // Block signals due to small stack in DoClone.
-+ sigset_t oldSigs;
-+ BlockAllSignals(&oldSigs);
-+
-+ int ret = 0;
- jmp_buf ctx;
- if (setjmp(ctx) == 0) {
- // In the parent and just called setjmp:
-- return DoClone(aFlags | SIGCHLD, &ctx);
-+ ret = DoClone(aFlags | SIGCHLD, &ctx);
- }
-+ RestoreSignals(&oldSigs);
- // In the child and have longjmp'ed:
-- return 0;
-+ return ret;
- }
-
- static bool WriteStringToFile(const char* aPath, const char* aStr,
---
-2.32.0
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b8a24d53bfc73f9d1c6af6323ad941411e0c94cf), Pavel Vinogradov, 09/06/2021

Archive powered by MHonArc 2.6.24.

Top of Page