Skip to Content.
Sympa Menu

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

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 (1539cd423a47603027678a35e23df2c0343a245c)
  • Date: Tue, 11 Jan 2022 23:32:25 +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
| 8
http/firefox/patches/0002-Fortify-sources-properly.patch
| 6
http/firefox/patches/0003-Check-additional-plugins-dir.patch
| 4
http/firefox/patches/0004-bmo-847568-Support-system-harfbuzz.patch
| 26 +-
http/firefox/patches/0005-bmo-847568-Support-system-graphite2.patch
| 12 -
http/firefox/patches/0006-bmo-1559213-Support-system-av1.patch
| 16 -
http/firefox/patches/0007-Support-sndio-audio-framework.patch
| 6
http/firefox/patches/0008-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
| 4
http/firefox/patches/0009-bmo-1516803-Fix-building-sandbox.patch
| 6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

http/firefox/patches/0032-bmo-1745560-Fix-building-against-wayland-1.20.patch
| 31 ---
56 files changed, 950 insertions(+), 1002 deletions(-)

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

http/firefox: version 96.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index 6f66379..de386aa 100755
--- a/http/firefox/DEPENDS
+++ b/http/firefox/DEPENDS
@@ -35,7 +35,7 @@ depends libwebp "--with-system-webp"
&&

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

-local NSS_BRANCH="3.72" &&
+local NSS_BRANCH="3.73" &&
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 dc5d54b..ac620c0 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=95.0.2
- SECURITY_PATCH=156
+ VERSION=96.0
+ SECURITY_PATCH=157
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 0dad977..c837963 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2022-01-11 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 96.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.73
+ * patches/*: updated
+
2021-12-20 Pavel Vinogradov <public AT sourcemage.org>
* patches/*: updated, fixes building with wayland >= 1.20

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 992bd2e..27c2fc3 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 5afd7721b1433d1d354abd96e2fdc967fe34f8d7 Mon Sep 17 00:00:00 2001
+From db2794973f8a5e580fbceacbfb1b6469c9f162d7 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/32] Don't use build id
+Subject: [PATCH 01/30] 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,7 +14,7 @@ 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 dcc78d3b16..c2633069e2 100644
+index 905494b784..15a7a2a852 100644
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -350,13 +350,6 @@ if test "$GNU_CC"; then
@@ -32,7 +32,7 @@ index dcc78d3b16..c2633069e2 100644
fi

diff --git a/old-configure.in b/old-configure.in
-index 9c8cdb462a..1707e98471 100644
+index d1479574d1..f69f5f5456 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -337,13 +337,6 @@ if test "$GNU_CC"; then
diff --git a/http/firefox/patches/0002-Fortify-sources-properly.patch
b/http/firefox/patches/0002-Fortify-sources-properly.patch
index 98e39fa..3abe8b0 100644
--- a/http/firefox/patches/0002-Fortify-sources-properly.patch
+++ b/http/firefox/patches/0002-Fortify-sources-properly.patch
@@ -1,7 +1,7 @@
-From e9f2525adaa1958f048acee2bd873a5c3aaa0c5b Mon Sep 17 00:00:00 2001
+From a1395e97ffdbc9404a343b76fd731dc7ef385ffc 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/32] Fortify sources properly
+Subject: [PATCH 02/30] 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 4e210b8f0f..e060fd2dcc 100644
+index a1b58eb59b..ae0c9d6d7c 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -229,7 +229,6 @@ system_headers = [
diff --git a/http/firefox/patches/0003-Check-additional-plugins-dir.patch
b/http/firefox/patches/0003-Check-additional-plugins-dir.patch
index c1f2b2c..ef66d9b 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 461b9a82277a8f610642bc1b40ba6d4f8870355b Mon Sep 17 00:00:00 2001
+From 4d5eb53fa2ca9eeeadbfcd2be832aa8e97d413fc 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/32] Check additional plugins dir
+Subject: [PATCH 03/30] Check additional plugins dir

Check original plugins dir along with default plugins dir.

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 cd5edca..abcf190 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 7f2fec622a442d150368b762fbe632580281104e Mon Sep 17 00:00:00 2001
+From 61e8f03c526a40dda89b57aad6aec3f37d7125cd 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/32] bmo#847568: Support system harfbuzz
+Subject: [PATCH 04/30] 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 e060fd2dcc..7178ada497 100644
+index ae0c9d6d7c..44d08cf06b 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -1236,6 +1236,13 @@ if CONFIG['OS_TARGET'] == 'Android':
+@@ -1237,6 +1237,13 @@ if CONFIG['OS_TARGET'] == 'Android':
'vr/gvr/capi/include/gvr.h',
]

@@ -39,7 +39,7 @@ index e060fd2dcc..7178ada497 100644
system_headers += [
'jack/jack.h',
diff --git a/dom/base/moz.build b/dom/base/moz.build
-index 1e9ee396b7..2e5f8c10f6 100644
+index d390adfc49..4508f19cb6 100644
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -567,6 +567,9 @@ FINAL_LIBRARY = "xul"
@@ -75,10 +75,10 @@ index 4d6d63da9d..8222b72333 100644
"thebes",
"ipc",
diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
-index 7d6644f65e..ba37dc9f90 100755
+index 5e0fd17d79..860b80af4f 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'):
+@@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]

@@ -89,10 +89,10 @@ index 7d6644f65e..ba37dc9f90 100755
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
-index 4ff948f567..6e920ff27f 100755
+index 524bd28dac..615c93b266 100755
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
-@@ -489,6 +489,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -488,6 +488,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]

@@ -131,10 +131,10 @@ index 301eb9a854..7cece5e06c 100644

GeneratedFile(
diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build
-index 4e29fb6c7f..3adbe4ca9f 100644
+index f769e270fa..8f64710257 100644
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
-@@ -107,6 +107,9 @@ LOCAL_INCLUDES += [
+@@ -109,4 +109,7 @@ LOCAL_INCLUDES += [
"/netwerk/protocol/http",
]

@@ -142,8 +142,6 @@ index 4e29fb6c7f..3adbe4ca9f 100644
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
+
USE_LIBS += ["icu"]
-
- if CONFIG["CC_TYPE"] in ("clang", "gcc"):
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
index 2c3f86948e..dd6901ba9a 100644
--- a/toolkit/library/moz.build
@@ -159,7 +157,7 @@ index 2c3f86948e..dd6901ba9a 100644
OS_LIBS += CONFIG["MOZ_JPEG_LIBS"]

diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index a78a32bdc0..73658c073e 100644
+index 00698656f6..1843188d11 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -460,6 +460,15 @@ add_old_configure_assignment(
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 feea1a9..74d9b24 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 c5230b3e0caf6fa208bab8f7fd4c30c7fe58a2c9 Mon Sep 17 00:00:00 2001
+From a7761d4886498eaa0e83d1c9b4399632cdbf314e 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/32] bmo#847568: Support system graphite2
+Subject: [PATCH 05/30] 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 7178ada497..4e3aef0f24 100644
+index 44d08cf06b..2f7ae39515 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -1243,6 +1243,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+@@ -1244,6 +1244,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
'harfbuzz/hb.h',
]

@@ -134,7 +134,7 @@ index c51c36e2b4..4f02a9e2a5 100644
if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
diff --git a/old-configure.in b/old-configure.in
-index 1707e98471..95098e4638 100644
+index f69f5f5456..1c1c8ecef3 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2204,6 +2204,27 @@ if test "$USE_FC_FREETYPE"; then
@@ -180,7 +180,7 @@ index dd6901ba9a..be73ac4bee 100644
OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]

diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index 73658c073e..77424c64c2 100644
+index 1843188d11..a68e1b347d 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -460,6 +460,19 @@ add_old_configure_assignment(
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 4b9deae..e894258 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 ae83763f3a4a21fb3d41d5e9fc4ea466fda2a7d4 Mon Sep 17 00:00:00 2001
+From 8a4627c0c910415b00bebeb976dc6ea8c3e0d5d0 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/32] bmo#1559213: Support system av1
+Subject: [PATCH 06/30] 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 6a2ed9e4a2..697bb9d0bf 100644
+index ab771212bf..75595d999c 100644
--- a/config/external/moz.build
+++ b/config/external/moz.build
-@@ -46,8 +46,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
+@@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
external_dirs += ["media/libvpx"]

if CONFIG["MOZ_AV1"]:
@@ -31,10 +31,10 @@ index 6a2ed9e4a2..697bb9d0bf 100644
if not CONFIG["MOZ_SYSTEM_PNG"]:
external_dirs += ["media/libpng"]
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index 4e3aef0f24..14bd336df4 100644
+index 2f7ae39515..96ab3a6466 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -1300,6 +1300,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
+@@ -1301,6 +1301,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
'proxy.h',
]

@@ -50,7 +50,7 @@ index 4e3aef0f24..14bd336df4 100644
system_headers += [
'vpx_mem/vpx_mem.h',
diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
-index 16ca8a9cbc..b349dcbe6d 100644
+index 8509aec6ef..7c5a1df63d 100644
--- a/dom/media/platforms/moz.build
+++ b/dom/media/platforms/moz.build
@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]:
@@ -66,7 +66,7 @@ index 16ca8a9cbc..b349dcbe6d 100644
if CONFIG["MOZ_OMX"]:
EXPORTS += [
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index 77424c64c2..60197e5456 100644
+index a68e1b347d..7b7975bd12 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -544,14 +544,29 @@ def av1(value):
diff --git a/http/firefox/patches/0007-Support-sndio-audio-framework.patch
b/http/firefox/patches/0007-Support-sndio-audio-framework.patch
index 259318c..f116a7a 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 7d80af5250a056be9f9c839c386c7a4029b87fff Mon Sep 17 00:00:00 2001
+From c6f2bf5c250fec953c853a941ad0d9d0606255b0 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/32] Support sndio audio framework
+Subject: [PATCH 07/30] Support sndio audio framework

Bug: https://bugs.gentoo.org/785613
Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
@@ -43,7 +43,7 @@ index 872484c311..28994a693d 100644

if CONFIG['OS_TARGET'] == 'Darwin':
diff --git a/old-configure.in b/old-configure.in
-index 95098e4638..f3b92b3695 100644
+index 1c1c8ecef3..b63dc03cc6 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2325,6 +2325,23 @@ fi
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 15b95b5..6b1cde0 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 409a51cb5afd1b2fa1abc6953830b98ff3708263 Mon Sep 17 00:00:00 2001
+From e43f7431036904989cfd520f19de28a72be97ad9 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/32] bmo#878089: Don't fail when TERM is not set
+Subject: [PATCH 08/30] 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
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 6b1a3ac..24333b2 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 026eb522aab43f39b2c89a0dd8d450eb394ed77a Mon Sep 17 00:00:00 2001
+From 6eeeca1b673a60d3e51427b2a5cf3e916bdb012b 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/32] bmo#1516803: Fix building sandbox
+Subject: [PATCH 09/30] bmo#1516803: Fix building sandbox

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516803
Bug: https://bugs.gentoo.org/666580
@@ -11,7 +11,7 @@ Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
-index 0a3a14c96d..81c89bd947 100644
+index 573f667812..e62d1a99a4 100644
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -116,7 +116,7 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"):
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
deleted file mode 100644
index e2de1a1..0000000
---
a/http/firefox/patches/0010-Fix-building-spellchecker-when-using-GCC-and-PGO.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 49509912d5411e547c6eb56d06e141bc6205c081 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/32] 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>
----
- extensions/spellcheck/src/moz.build | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/extensions/spellcheck/src/moz.build
b/extensions/spellcheck/src/moz.build
-index dcc1d54f74..06a2ad5a15 100644
---- a/extensions/spellcheck/src/moz.build
-+++ b/extensions/spellcheck/src/moz.build
-@@ -31,3 +31,8 @@ EXPORTS.mozilla += [
-
- if CONFIG["CC_TYPE"] in ("clang", "gcc"):
- CXXFLAGS += ["-Wno-error=shadow"]
-+
-+# spell checker triggers bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88561
-+# in GCC 7 and 8. It will be fixed in GCC 7.5 and 8.3
-+if CONFIG["CC_TYPE"] in ("gcc"):
-+ CXXFLAGS += ["-fno-devirtualize"]
---
-2.34.1
-
diff --git
a/http/firefox/patches/0010-musl-Add-alternate-name-for-private-siginfo-struct-m.patch

b/http/firefox/patches/0010-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
new file mode 100644
index 0000000..300846f
--- /dev/null
+++
b/http/firefox/patches/0010-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
@@ -0,0 +1,35 @@
+From d8ec0bd6f3b0ad2dfd8a97a864f08decaafdea69 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 10/30] 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.34.1
+
diff --git
a/http/firefox/patches/0011-musl-Add-alternate-name-for-private-siginfo-struct-m.patch

b/http/firefox/patches/0011-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
deleted file mode 100644
index f4f1bd7..0000000
---
a/http/firefox/patches/0011-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3f6da58bceab982f34554f24382db37eef176cfa 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 11/32] 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.34.1
-
diff --git a/http/firefox/patches/0011-musl-Fix-syscall-wrappers.patch
b/http/firefox/patches/0011-musl-Fix-syscall-wrappers.patch
new file mode 100644
index 0000000..d9dda49
--- /dev/null
+++ b/http/firefox/patches/0011-musl-Fix-syscall-wrappers.patch
@@ -0,0 +1,42 @@
+From 1b46c0fc085fe93c36320d7ac1004c83efccdccc 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 11/30] 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.34.1
+
diff --git a/http/firefox/patches/0012-musl-Fix-syscall-wrappers.patch
b/http/firefox/patches/0012-musl-Fix-syscall-wrappers.patch
deleted file mode 100644
index dcf029c..0000000
--- a/http/firefox/patches/0012-musl-Fix-syscall-wrappers.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 89cf5ddec1c8e6311b1df36b3d42524106f83e22 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 12/32] 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.34.1
-
diff --git
a/http/firefox/patches/0012-musl-Only-use-system-heap-reporter-with-glibc.patch

b/http/firefox/patches/0012-musl-Only-use-system-heap-reporter-with-glibc.patch
new file mode 100644
index 0000000..08f0214
--- /dev/null
+++
b/http/firefox/patches/0012-musl-Only-use-system-heap-reporter-with-glibc.patch
@@ -0,0 +1,33 @@
+From 68dd87a3dc06cf59396dccc3e031761f7237656e 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 12/30] 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 bd4629c785..b513f81216 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.34.1
+
diff --git
a/http/firefox/patches/0013-musl-Only-use-system-heap-reporter-with-glibc.patch

b/http/firefox/patches/0013-musl-Only-use-system-heap-reporter-with-glibc.patch
deleted file mode 100644
index d79b921..0000000
---
a/http/firefox/patches/0013-musl-Only-use-system-heap-reporter-with-glibc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From abe1d2ac2da8aa950c22e7afeaa8cb04fc267327 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 13/32] 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 bd4629c785..b513f81216 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.34.1
-
diff --git
a/http/firefox/patches/0013-musl-Set-pthread-name-for-non-glibc-systems.patch
b/http/firefox/patches/0013-musl-Set-pthread-name-for-non-glibc-systems.patch
new file mode 100644
index 0000000..fe74bb1
--- /dev/null
+++
b/http/firefox/patches/0013-musl-Set-pthread-name-for-non-glibc-systems.patch
@@ -0,0 +1,29 @@
+From 70d47d18420fe9e3de8f896c08f97ef2596c9c84 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 13/30] 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.34.1
+
diff --git
a/http/firefox/patches/0014-musl-Set-pthread-name-for-non-glibc-systems.patch
b/http/firefox/patches/0014-musl-Set-pthread-name-for-non-glibc-systems.patch
deleted file mode 100644
index fb22ca5..0000000
---
a/http/firefox/patches/0014-musl-Set-pthread-name-for-non-glibc-systems.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 22643933640f8305b2b6321b7dabcb83f28ba7e7 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 14/32] 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.34.1
-
diff --git
a/http/firefox/patches/0014-musl-getcontext-is-only-avaliable-on-glibc-systems.patch

b/http/firefox/patches/0014-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
new file mode 100644
index 0000000..e9cf02e
--- /dev/null
+++
b/http/firefox/patches/0014-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
@@ -0,0 +1,28 @@
+From 3283cc3981f99894dec1219fbf380489905827a9 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 14/30] 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 d065387552..aaca9e81e4 100644
+--- a/tools/profiler/core/platform-linux-android.cpp
++++ b/tools/profiler/core/platform-linux-android.cpp
+@@ -603,8 +603,10 @@ static void PlatformInit(PSLockRef aLock) {}
+
+ #if defined(HAVE_NATIVE_UNWIND)
+ void Registers::SyncPopulate() {
++#if defined(__GLIBC__)
+ if (!getcontext(&mContextSyncStorage)) {
+ PopulateRegsFromContext(*this, &mContextSyncStorage);
+ }
++#endif
+ }
+ #endif
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0015-musl-getcontext-is-only-avaliable-on-glibc-systems.patch

b/http/firefox/patches/0015-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
deleted file mode 100644
index b8c24b3..0000000
---
a/http/firefox/patches/0015-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ae527e3c05ff35b1781819d4ddcc9ba89141db2c 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 15/32] 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 a66043eeb8..fe0bd3c149 100644
---- a/tools/profiler/core/platform-linux-android.cpp
-+++ b/tools/profiler/core/platform-linux-android.cpp
-@@ -572,8 +572,10 @@ static void PlatformInit(PSLockRef aLock) {}
-
- #if defined(HAVE_NATIVE_UNWIND)
- void Registers::SyncPopulate() {
-+#if defined(__GLIBC__)
- if (!getcontext(&mContextSyncStorage)) {
- PopulateRegsFromContext(*this, &mContextSyncStorage);
- }
-+#endif
- }
- #endif
---
-2.34.1
-
diff --git
a/http/firefox/patches/0015-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch

b/http/firefox/patches/0015-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
new file mode 100644
index 0000000..121c8cd
--- /dev/null
+++
b/http/firefox/patches/0015-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
@@ -0,0 +1,51 @@
+From beed745f96bbc18a3c22a728095c9a2eef7435ee 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 15/30] musl: sys/auvx.h avaliable on more then just glibc
+ systems
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ .../system_wrappers/source/cpu_features_linux.cc | 12 +++---------
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+diff --git
a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+index 335bed4da3..c2c98dae8a 100644
+--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
++++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -12,13 +12,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#ifdef __GLIBC_PREREQ
+-#define WEBRTC_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
+-#else
+-#define WEBRTC_GLIBC_PREREQ(a, b) 0
+-#endif
+-
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if defined(__linux__)
+ #include <sys/auxv.h>
+ #else
+ #include <errno.h>
+@@ -40,7 +34,7 @@ uint64_t GetCPUFeaturesARM(void) {
+ int architecture = 0;
+ uint64_t hwcap = 0;
+ const char* platform = NULL;
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if defined(__linux__)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
+@@ -64,7 +58,7 @@ uint64_t GetCPUFeaturesARM(void) {
+ }
+ close(fd);
+ }
+-#endif // WEBRTC_GLIBC_PREREQ(2, 16)
++#endif // (__linux__)
+ #if defined(__aarch64__)
+ architecture = 8;
+ if ((hwcap & HWCAP_FP) != 0)
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0016-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

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

b/http/firefox/patches/0016-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
deleted file mode 100644
index 84642b8..0000000
---
a/http/firefox/patches/0016-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 04dc6d6531cb200b6cdb92fab525dfb231376d56 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 16/32] 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.34.1
-
diff --git
a/http/firefox/patches/0017-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch

b/http/firefox/patches/0017-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
new file mode 100644
index 0000000..de77780
--- /dev/null
+++
b/http/firefox/patches/0017-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
@@ -0,0 +1,27 @@
+From 08a7a0d7fa52e1bdacdcb47e847cf5ecd980ee6f 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 17/30] 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.34.1
+
diff --git
a/http/firefox/patches/0017-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch

b/http/firefox/patches/0017-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
deleted file mode 100644
index 512d8d2..0000000
---
a/http/firefox/patches/0017-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 33fffd37b81292f4f28f71b0ce73d5e14c64719c 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 17/32] 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.34.1
-
diff --git a/http/firefox/patches/0018-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0018-Make-PGO-use-toolchain.patch
new file mode 100644
index 0000000..3f72b05
--- /dev/null
+++ b/http/firefox/patches/0018-Make-PGO-use-toolchain.patch
@@ -0,0 +1,33 @@
+From 45d43bb2dc1c1c033c860951c93261e98647f851 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Mon, 6 Apr 2020 20:13:34 +0200
+Subject: [PATCH 18/30] Make PGO use toolchain
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ build/unix/mozconfig.unix | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
+index 9ca9c97fce..9f86fe0940 100644
+--- a/build/unix/mozconfig.unix
++++ b/build/unix/mozconfig.unix
+@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
+ CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
+ CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
+
++ if [ -n "$MOZ_PGO" ]; then
++ if [ -z "$USE_ARTIFACT" ]; then
++ ac_add_options --enable-lto
++ fi
++ export AR="$topsrcdir/gcc/bin/gcc-ar"
++ export NM="$topsrcdir/gcc/bin/gcc-nm"
++ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
++ fi
++
+ # We want to make sure we use binutils and other binaries in the
tooltool
+ # package.
+ mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0018-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch

b/http/firefox/patches/0018-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
deleted file mode 100644
index 46e9cff..0000000
---
a/http/firefox/patches/0018-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 183e4f90f968068b663857755142d79dc0963778 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 18/32] 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.34.1
-
diff --git a/http/firefox/patches/0019-Make-PGO-use-toolchain.patch
b/http/firefox/patches/0019-Make-PGO-use-toolchain.patch
deleted file mode 100644
index a115c9a..0000000
--- a/http/firefox/patches/0019-Make-PGO-use-toolchain.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b0d84725cccf578dd1f614a264a29a8f3473a182 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 19/32] Make PGO use toolchain
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/unix/mozconfig.unix | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
-index 9ca9c97fce..9f86fe0940 100644
---- a/build/unix/mozconfig.unix
-+++ b/build/unix/mozconfig.unix
-@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
- CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
- CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
-
-+ if [ -n "$MOZ_PGO" ]; then
-+ if [ -z "$USE_ARTIFACT" ]; then
-+ ac_add_options --enable-lto
-+ fi
-+ export AR="$topsrcdir/gcc/bin/gcc-ar"
-+ export NM="$topsrcdir/gcc/bin/gcc-nm"
-+ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
-+ fi
-+
- # We want to make sure we use binutils and other binaries in the
tooltool
- # package.
- mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
---
-2.34.1
-
diff --git
a/http/firefox/patches/0019-bmo-1516081-Disable-watchdog-during-PGO-builds.patch

b/http/firefox/patches/0019-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
new file mode 100644
index 0000000..70cf5c3
--- /dev/null
+++
b/http/firefox/patches/0019-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
@@ -0,0 +1,55 @@
+From 2502829abc1a02a08cc1934538c3d30e6f4f6fae 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 19/30] 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 e5a4e6f913..567ccf0ba4 100644
+--- a/build/moz.configure/lto-pgo.configure
++++ b/build/moz.configure/lto-pgo.configure
+@@ -84,7 +84,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"],
+@@ -98,7 +98,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 194bb36e2d..c960d44137 100644
+--- a/toolkit/components/terminator/nsTerminator.cpp
++++ b/toolkit/components/terminator/nsTerminator.cpp
+@@ -466,6 +466,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.34.1
+
diff --git
a/http/firefox/patches/0020-bmo-1516081-Disable-watchdog-during-PGO-builds.patch

b/http/firefox/patches/0020-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
deleted file mode 100644
index 51f2221..0000000
---
a/http/firefox/patches/0020-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 4e0bae4eb9f51834b7010d1ab91844695fb2528c 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 20/32] 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 e5a4e6f913..567ccf0ba4 100644
---- a/build/moz.configure/lto-pgo.configure
-+++ b/build/moz.configure/lto-pgo.configure
-@@ -84,7 +84,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"],
-@@ -98,7 +98,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 194bb36e2d..c960d44137 100644
---- a/toolkit/components/terminator/nsTerminator.cpp
-+++ b/toolkit/components/terminator/nsTerminator.cpp
-@@ -466,6 +466,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.34.1
-
diff --git
a/http/firefox/patches/0020-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch

b/http/firefox/patches/0020-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
new file mode 100644
index 0000000..ef8f9b2
--- /dev/null
+++
b/http/firefox/patches/0020-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
@@ -0,0 +1,32 @@
+From 0501ed4bbdbf8d16a69a4460d2ada33ac259365d 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 20/30] 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 e62d1a99a4..913b9ba2ce 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.34.1
+
diff --git
a/http/firefox/patches/0021-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0021-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..7ccfeca
--- /dev/null
+++ b/http/firefox/patches/0021-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
@@ -0,0 +1,28 @@
+From 4aa13b6df03765bd648583d533f584564c7f8537 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 21/30] 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 0abded9175..486c2dda6d 100644
+--- a/widget/gtk/nsWindow.cpp
++++ b/widget/gtk/nsWindow.cpp
+@@ -161,7 +161,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.34.1
+
diff --git
a/http/firefox/patches/0021-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch

b/http/firefox/patches/0021-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
deleted file mode 100644
index b68ba5d..0000000
---
a/http/firefox/patches/0021-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 8e8b47da9ac6f33ac35ca07e5e76f22720b96865 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 21/32] 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 81c89bd947..a5b76067a7 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.34.1
-
diff --git
a/http/firefox/patches/0022-Fix-building-with-PGO-when-using-GCC.patch
b/http/firefox/patches/0022-Fix-building-with-PGO-when-using-GCC.patch
new file mode 100644
index 0000000..81de54b
--- /dev/null
+++ b/http/firefox/patches/0022-Fix-building-with-PGO-when-using-GCC.patch
@@ -0,0 +1,84 @@
+From 98e1e605c8fdf7b021d6f1888ce6baed5c1097b5 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 22/30] 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 567ccf0ba4..c6470ef829 100644
+--- a/build/moz.configure/lto-pgo.configure
++++ b/build/moz.configure/lto-pgo.configure
+@@ -83,11 +83,12 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
+ @imports("multiprocessing")
+ 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.34.1
+
diff --git
a/http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 3d13a1a..0000000
--- a/http/firefox/patches/0022-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From a999c252cfc8195e01c566523335a7b6433019cf 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 22/32] 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 620e2f47f2..0f6b701441 100644
---- a/widget/gtk/nsWindow.cpp
-+++ b/widget/gtk/nsWindow.cpp
-@@ -161,7 +161,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.34.1
-
diff --git
a/http/firefox/patches/0023-Fix-building-with-PGO-when-using-GCC.patch
b/http/firefox/patches/0023-Fix-building-with-PGO-when-using-GCC.patch
deleted file mode 100644
index 61a585f..0000000
--- a/http/firefox/patches/0023-Fix-building-with-PGO-when-using-GCC.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 2d23d70e94cefb707cb77ec931d48e4a8aa8954b 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 23/32] 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 567ccf0ba4..c6470ef829 100644
---- a/build/moz.configure/lto-pgo.configure
-+++ b/build/moz.configure/lto-pgo.configure
-@@ -83,11 +83,12 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
- @imports("multiprocessing")
- 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.34.1
-
diff --git
a/http/firefox/patches/0023-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0023-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
new file mode 100644
index 0000000..85c305f
--- /dev/null
+++
b/http/firefox/patches/0023-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
@@ -0,0 +1,28 @@
+From 6e220b49aee7dbdcafd255f6260517c5c551f9b1 Mon Sep 17 00:00:00 2001
+From: Mike Hommey <mh AT glandium.org>
+Date: Mon, 26 Nov 2018 09:59:56 +0900
+Subject: [PATCH 23/30] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
+ libaom neon code
+
+Bug: https://bugs.gentoo.org/730606
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ media/libaom/moz.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index fd8c7f2b33..db3f9ca6ec 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
+--
+2.34.1
+
diff --git a/http/firefox/patches/0024-build-Disable-Werror.patch
b/http/firefox/patches/0024-build-Disable-Werror.patch
new file mode 100644
index 0000000..f45ecb8
--- /dev/null
+++ b/http/firefox/patches/0024-build-Disable-Werror.patch
@@ -0,0 +1,28 @@
+From abc720ed6f0451e3f1c5ff9ae074ae02684306f7 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 24/30] 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 0d925a9b80..2ac91626c4 100755
+--- a/build/moz.configure/warnings.configure
++++ b/build/moz.configure/warnings.configure
+@@ -216,7 +216,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.34.1
+
diff --git
a/http/firefox/patches/0024-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0024-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
deleted file mode 100644
index 14728c5..0000000
---
a/http/firefox/patches/0024-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 152aa9e23736fd99647e0b61f627e9a3d40fed56 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 24/32] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
- libaom neon code
-
-Bug: https://bugs.gentoo.org/730606
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- media/libaom/moz.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/media/libaom/moz.build b/media/libaom/moz.build
-index fd8c7f2b33..db3f9ca6ec 100644
---- a/media/libaom/moz.build
-+++ b/media/libaom/moz.build
-@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
-
- for f in SOURCES:
- if f.endswith('neon.c'):
-- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
-+ SOURCES[f].flags += CONFIG['NEON_FLAGS']
-
- if CONFIG['OS_TARGET'] == 'Android':
- # For cpu-features.h
---
-2.34.1
-
diff --git
a/http/firefox/patches/0025-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0025-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..32bd0eb
--- /dev/null
+++
b/http/firefox/patches/0025-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
@@ -0,0 +1,34 @@
+From 685e82ac82921720c6cd9c6c45703ff034f081e7 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Sat, 29 Aug 2020 22:30:59 +0200
+Subject: [PATCH 25/30] LTO: Only enable LTO for Rust when complete build uses
+ LTO
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ config/makefiles/rust.mk | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+index 75570d32b9..924722a506 100644
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -87,6 +87,7 @@ endif
+ # These flags are passed via `cargo rustc` and only apply to the final rustc
+ # invocation (i.e., only the top-level crate, not its dependencies).
+ cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
++ifdef MOZ_LTO
+ ifndef DEVELOPER_OPTIONS
+ ifndef MOZ_DEBUG_RUST
+ # Enable link-time optimization for release builds, but not when linking
+@@ -106,6 +107,7 @@ endif
+ endif
+ endif
+ endif
++endif
+
+ ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
+--
+2.34.1
+
diff --git a/http/firefox/patches/0025-build-Disable-Werror.patch
b/http/firefox/patches/0025-build-Disable-Werror.patch
deleted file mode 100644
index 1ded1bc..0000000
--- a/http/firefox/patches/0025-build-Disable-Werror.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 98672d8bbca50efacbdd35285be336b27f24fa95 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 25/32] 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 dcb353859f..8a25b43201 100755
---- a/build/moz.configure/warnings.configure
-+++ b/build/moz.configure/warnings.configure
-@@ -212,7 +212,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.34.1
-
diff --git
a/http/firefox/patches/0026-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0026-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
deleted file mode 100644
index 1259d79..0000000
---
a/http/firefox/patches/0026-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f8bcf72a3fdb62f27f23d7bcbd1253f82ff027e1 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 26/32] 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 abd2181858..bb6b58db85 100644
---- a/config/makefiles/rust.mk
-+++ b/config/makefiles/rust.mk
-@@ -87,6 +87,7 @@ endif
- # These flags are passed via `cargo rustc` and only apply to the final rustc
- # invocation (i.e., only the top-level crate, not its dependencies).
- cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
-+ifdef MOZ_LTO
- ifndef DEVELOPER_OPTIONS
- ifndef MOZ_DEBUG_RUST
- # Enable link-time optimization for release builds, but not when linking
-@@ -103,6 +104,7 @@ endif
- endif
- endif
- endif
-+endif
-
- ifdef CARGO_INCREMENTAL
- export CARGO_INCREMENTAL
---
-2.34.1
-
diff --git a/http/firefox/patches/0026-Make-elfhack-use-toolchain.patch
b/http/firefox/patches/0026-Make-elfhack-use-toolchain.patch
new file mode 100644
index 0000000..c4e9080
--- /dev/null
+++ b/http/firefox/patches/0026-Make-elfhack-use-toolchain.patch
@@ -0,0 +1,26 @@
+From cc2320222520ceda6578b476b6696aba29f250ac 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 26/30] 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 57ad54f113..ec991fa648 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.34.1
+
diff --git a/http/firefox/patches/0027-Disable-FFVPX-with-VA-API.patch
b/http/firefox/patches/0027-Disable-FFVPX-with-VA-API.patch
new file mode 100644
index 0000000..42d639f
--- /dev/null
+++ b/http/firefox/patches/0027-Disable-FFVPX-with-VA-API.patch
@@ -0,0 +1,91 @@
+From 38068d0801ad85ba36673ab2ad6a53e0fd3ffdde 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 27/30] 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 9b0342ce82..4e377082ae 100644
+--- a/dom/media/platforms/PDMFactory.cpp
++++ b/dom/media/platforms/PDMFactory.cpp
+@@ -486,12 +486,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() &&
+@@ -499,6 +493,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>();
+ }
+@@ -535,11 +535,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>()) {
+@@ -547,6 +542,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(),
+@@ -581,11 +581,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>()) {
+@@ -593,6 +588,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.34.1
+
diff --git a/http/firefox/patches/0027-Make-elfhack-use-toolchain.patch
b/http/firefox/patches/0027-Make-elfhack-use-toolchain.patch
deleted file mode 100644
index b10df9d..0000000
--- a/http/firefox/patches/0027-Make-elfhack-use-toolchain.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From acd924914e8a6c23ed377f036f80346160b94adf 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 27/32] 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.34.1
-
diff --git a/http/firefox/patches/0028-Disable-FFVPX-with-VA-API.patch
b/http/firefox/patches/0028-Disable-FFVPX-with-VA-API.patch
deleted file mode 100644
index c6e839a..0000000
--- a/http/firefox/patches/0028-Disable-FFVPX-with-VA-API.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 1e48a24951577ea59ffcfef6aa3b51961b844053 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 28/32] 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 9b0342ce82..4e377082ae 100644
---- a/dom/media/platforms/PDMFactory.cpp
-+++ b/dom/media/platforms/PDMFactory.cpp
-@@ -486,12 +486,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() &&
-@@ -499,6 +493,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>();
- }
-@@ -535,11 +535,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>()) {
-@@ -547,6 +542,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(),
-@@ -581,11 +581,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>()) {
-@@ -593,6 +588,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.34.1
-
diff --git
a/http/firefox/patches/0028-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0028-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 0000000..2c6a271
--- /dev/null
+++
b/http/firefox/patches/0028-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
@@ -0,0 +1,36 @@
+From 58b0385412c6d96eb745e2fc5902df347e629f6d 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 28/30] 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.34.1
+
diff --git
a/http/firefox/patches/0029-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0029-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
deleted file mode 100644
index 0375e2c..0000000
---
a/http/firefox/patches/0029-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9c7d7aa616c4f29c0c5e907d6c0b27ee926d6762 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 29/32] 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.34.1
-
diff --git
a/http/firefox/patches/0029-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch

b/http/firefox/patches/0029-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
new file mode 100644
index 0000000..856361d
--- /dev/null
+++
b/http/firefox/patches/0029-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
@@ -0,0 +1,96 @@
+From 0b53fcfa8ee76ccc2d77abb947810f631efaecd9 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 29/30] 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 4e377082ae..e778eb9948 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, ...) \
+@@ -536,10 +538,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
+@@ -556,8 +560,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.34.1
+
diff --git
a/http/firefox/patches/0030-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch

b/http/firefox/patches/0030-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
new file mode 100644
index 0000000..130edc4
--- /dev/null
+++
b/http/firefox/patches/0030-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
@@ -0,0 +1,55 @@
+From 2da8000880fe27908f1b18aba65a1b5e5f479cd8 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 30/30] 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 c73bf38be6..0d521d5d7b 100644
+--- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
++++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
+@@ -69,6 +69,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.34.1
+
diff --git
a/http/firefox/patches/0030-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch

b/http/firefox/patches/0030-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
deleted file mode 100644
index 5163cd0..0000000
---
a/http/firefox/patches/0030-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 461f5af7e1362eac4c751d40c3788d32c2a43572 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 30/32] 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 4e377082ae..e778eb9948 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, ...) \
-@@ -536,10 +538,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
-@@ -556,8 +560,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.34.1
-
diff --git
a/http/firefox/patches/0031-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch

b/http/firefox/patches/0031-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
deleted file mode 100644
index acdacfb..0000000
---
a/http/firefox/patches/0031-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From b572aa129f6868cb0ffa29a8b1b3c6a6ac54013a 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 31/32] 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 c73bf38be6..0d521d5d7b 100644
---- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
-+++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
-@@ -69,6 +69,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.34.1
-
diff --git
a/http/firefox/patches/0032-bmo-1745560-Fix-building-against-wayland-1.20.patch

b/http/firefox/patches/0032-bmo-1745560-Fix-building-against-wayland-1.20.patch
deleted file mode 100644
index 30e6fc3..0000000
---
a/http/firefox/patches/0032-bmo-1745560-Fix-building-against-wayland-1.20.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From a7c21dbcda513060e0d69a8bc682c48eb043730f Mon Sep 17 00:00:00 2001
-From: Jan Beich <jbeich AT FreeBSD.org>
-Date: Sun, 12 Dec 2021 02:16:02 +0100
-Subject: [PATCH 32/32] bmo#1745560: Fix building against >=wayland-1.20
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- widget/gtk/mozwayland/mozwayland.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/widget/gtk/mozwayland/mozwayland.c
b/widget/gtk/mozwayland/mozwayland.c
-index 7a448e6321..b997c59d78 100644
---- a/widget/gtk/mozwayland/mozwayland.c
-+++ b/widget/gtk/mozwayland/mozwayland.c
-@@ -40,6 +40,13 @@ MOZ_EXPORT void wl_event_queue_destroy(struct
wl_event_queue* queue) {}
-
- MOZ_EXPORT void wl_proxy_marshal(struct wl_proxy* p, uint32_t opcode, ...)
{}
-
-+MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags(
-+ struct wl_proxy* proxy, uint32_t opcode,
-+ const struct wl_interface* interface, uint32_t version, uint32_t flags,
-+ ...) {
-+ return NULL;
-+}
-+
- MOZ_EXPORT void wl_proxy_marshal_array(struct wl_proxy* p, uint32_t opcode,
- union wl_argument* args) {}
-
---
-2.34.1
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (1539cd423a47603027678a35e23df2c0343a245c), Pavel Vinogradov, 01/11/2022

Archive powered by MHonArc 2.6.24.

Top of Page