firefox: 105.0.1 -> 106.0.1

This commit is contained in:
Tim Biermann 2022-10-23 20:58:32 +02:00
parent c5dfa2a03b
commit a8d70f52a5
Signed by: tb
GPG Key ID: 42F8B4E30B673606
37 changed files with 8 additions and 11528 deletions

View File

@ -1,42 +1,8 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF32rnQnsEcYi0yvEjw6Iv31TltlKcLqPbLkvFCKBRcReIMj6StTfRLxQmxsdTFnCbH+vd4YKjikzwqmgzEJEGMgc=
SHA256 (Pkgfile) = 540351f2936031b0f6c1d852bce3b7ab1f696a9e56db5d7a1e6ab801eae770bf
RWSagIOpLGJF3yE1vDC9evRLUv6Aqp/BhhpoMppCdQoJ58M7KLCwUVtercd0NMQYGrVbkEJGcabbPZ08UicZC1JJ/jN/inc8/Qs=
SHA256 (Pkgfile) = acadcb4e2673d66e3a1c02b0d9c27a9946893c7fa5cc41bd7b91a8c99ecca1fe
SHA256 (.footprint) = c8226cc240304363b6289982601426f70c5cd4e82ac62feff3485bee4f48e050
SHA256 (firefox-105.0.1.source.tar.xz) = 70ecea0d26242d0c3613b9524405d72a22b52ae346072ac229a58c48634975cd
SHA256 (firefox-106.0.1.source.tar.xz) = bdf8184f9aadce4fd9613ec63525a96891e2e9dbbef9e4f72193038450a7fd35
SHA256 (firefox.desktop) = 8ba3439f3dfc5cab883641969c93d8d15f8f20d7188d9568346b2edad52d6f91
SHA256 (node-stdout-nonblocking-wrapper) = bb8c503015e49ed1b152225bdc56cf502cd831f35962d113dcbb9121967f3523
SHA256 (0001-Don-t-use-build-id.patch) = f55742252e6005670d05606e18ed7fb64369d8f12ff41993b8d713f468fd3465
SHA256 (0002-Fortify-sources-properly.patch) = 92d88a6cfd0bbf9a07f1171e6c3f65b8fb6863e286639867009f3f8712682a31
SHA256 (0003-Check-additional-plugins-dir.patch) = f97f2676182519c973a772bfca2cccdf1f4f31fd653c5ce044623a96270cac8b
SHA256 (0004-bmo-847568-Support-system-harfbuzz.patch) = a014deff6d8e12a3c1e394e90c404d635e5fa45ef0c0c4844c3619f37ce0d050
SHA256 (0005-bmo-847568-Support-system-graphite2.patch) = 27961704acd49fde267aaccd3067361658fb236d917e48bdc05a0d5380153292
SHA256 (0006-bmo-1559213-Support-system-av1.patch) = 7c6db1dd501c99cd5d4ba59e66dd1f5d3065008b2c343e733201982de0a89ac6
SHA256 (0007-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch) = 816c463b39779bc97ded28ed3e98ef91708e63edc51bfde1b612a03608ae0da8
SHA256 (0008-bmo-1516803-Fix-building-sandbox.patch) = 8e74496c183f0b8f13a55d50c502d583315872d43893c8649c38f7b3eea526eb
SHA256 (0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch) = 8d34520b8a8a5c6b0633a59a72e076df9621cf6e93e5e70f036223fbbab4a254
SHA256 (0010-musl-Fix-syscall-wrappers.patch) = 4d9d7ac287b37c950c70640addace870ee9a0c16d8e30d54883ee545bf77527b
SHA256 (0011-musl-Only-use-system-heap-reporter-with-glibc.patch) = 8b6c802f6f429b2385cba2c8b2a68ee0b40adeeaa4dbcc9cb535ab379494b150
SHA256 (0012-musl-Set-pthread-name-for-non-glibc-systems.patch) = a3472d0922a800b2c3043089f13cc8f2dd5f6448af3a1dcb23f385783c91c75f
SHA256 (0013-musl-getcontext-is-only-avaliable-on-glibc-systems.patch) = 6d4652c0be993c224a657ae19371dd4b88c80e293c6775c8a6006899123bc9d8
SHA256 (0014-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch) = dc373813110d7a1035e8615ce5598e119b74c8c6d5c27dae09a79727933f4672
SHA256 (0015-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch) = d32b4cc299882a6ca86ef231b3dcb6d44f517070656daae2143915894915d3a4
SHA256 (0016-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch) = 9628553d4d7f14eb54b21d48c3f56a863c905e0d27bffaaaf597e9359d6086ed
SHA256 (0017-Make-PGO-use-toolchain.patch) = 7b45e98356e6afbb67e0ff005cedd5b2022093bf1716ef0936ab3f6615f787da
SHA256 (0018-bmo-1516081-Disable-watchdog-during-PGO-builds.patch) = 1d713370fe5a8788aa1723ca291ae2f96635b92bc3cb80aea85d21847c59ed6d
SHA256 (0019-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch) = 7f070620a393d283b488c263bf8a871c1a0afe5801d963316e14474c27dd3d6d
SHA256 (0020-Fix-building-with-PGO-when-using-GCC.patch) = ccad3e01df1229ca55f526073f9e5e37005042cc9b46ef578907577e6b590e0e
SHA256 (0021-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch) = ef3bcc8bea2660b56927c6b00031db99efe8a5ecdcc947456b7bab0f7a7ff7e2
SHA256 (0022-build-Disable-Werror.patch) = b1ff9ae63dd0e581546d93abbb4fe770645ca75572b0a7c2a0d26d06e396241f
SHA256 (0023-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch) = 18fc8bab428137702d6774a93d3cc8d8f6b8ea68e1d86b32591e2c242e80e767
SHA256 (0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch) = eb83aa50ee543be99705994ff827805fad1e9c679f0402a8735651357bb8856c
SHA256 (0025-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch) = e828b8b48c55601de0fc3c244ff83ee5a0d48267de7c14eeeabc26487d8e747d
SHA256 (0026-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch) = 26f950b6681eb67234649668d9d67ad4b6c5ca5025457f440778ff31066cfdf2
SHA256 (0027-bgo-816975-fix-build-on-x86.patch) = 1d4add2a4afff50e4067ef4c404f781513c1c388126754fba1bf0323b1e093b3
SHA256 (0028-bmo-1559213-fix-system-av1-libs.patch) = 344482f28d4512718320e7396706982f149d20459ae43c9e5b838753fb8ee905
SHA256 (0029-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch) = b47ea62937d7f87485e0f372c0110785bbb6f4dbc79d3d139d54887cac0773e3
SHA256 (0030-bmo-1754469-memory_mozalloc_throw.patch) = ba1013f0b5a76312802ac62cc5dbc35ecdcd3d4946df78c4b3fc144afc829023
SHA256 (0031-bmo-1769631-python-3.11-compatibility.patch) = 5b0aad43012e4c175a6dde70b006fa9f07c4b0d70e9632414f16ac55d5243be4
SHA256 (0033-rhbz-2115253-vaapi-fixes.patch) = f2b19e14d8add13930e2ce89fa5e1b252ac979c8177a78a6fa3eb4ae2ad56633
SHA256 (0034-bgo-860033-firefox-wayland-no-dbus.patch) = efdf58e256b298bf8f0c0b7ead119830e99d1b2bf29ba1e43a9e0eeb8ac2e538
SHA256 (libwebrtc-screen-cast-sync-1.patch) = c8b07fce4bb923cdac621ab8c53de7dcb5e5a37891b883524de86546976b1779
SHA256 (no-ccache-stats.patch) = dc164e37ccf78d9a83dded7d7e52f091a703b650967ed8888120689c213eb1ab

View File

@ -1,54 +0,0 @@
From db2794973f8a5e580fbceacbfb1b6469c9f162d7 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@gentoo.org>
Date: Mon, 6 Apr 2020 19:14:26 +0200
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
splitdebug.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
js/src/old-configure.in | 7 -------
old-configure.in | 7 -------
2 files changed, 14 deletions(-)
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
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
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
- AC_MSG_CHECKING([for --build-id=sha1 option to ld])
- _SAVE_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,--build-id=sha1"
- AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- LDFLAGS=$_SAVE_LDFLAGS)
-
_DEFINES_CFLAGS="-include $jsconfdefs -DMOZILLA_CLIENT"
fi
diff --git a/old-configure.in b/old-configure.in
index d1479574d1..f69f5f5456 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -337,13 +337,6 @@ if test "$GNU_CC"; then
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
- AC_MSG_CHECKING([for --build-id=sha1 option to ld])
- _SAVE_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,--build-id=sha1"
- AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- LDFLAGS=$_SAVE_LDFLAGS)
-
AC_MSG_CHECKING([for --ignore-unresolved-symbol option to ld])
HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=
_SAVE_LDFLAGS=$LDFLAGS
--
2.34.1

View File

@ -1,41 +0,0 @@
From a1395e97ffdbc9404a343b76fd731dc7ef385ffc Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@gentoo.org>
Date: Mon, 6 Apr 2020 19:16:36 +0200
Subject: [PATCH 02/30] Fortify sources properly
Ensure we fortify properly, features.h is pulled in via fortification.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
config/system-headers.mozbuild | 1 -
third_party/sipcc/sdp_os_defs.h | 3 ---
2 files changed, 4 deletions(-)
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
index a1b58eb59b..ae0c9d6d7c 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -229,7 +229,6 @@ system_headers = [
'execinfo.h',
'extras.h',
'fcntl.h',
- 'features.h',
'fenv.h',
'ffi.h',
'fibdef.h',
diff --git a/third_party/sipcc/sdp_os_defs.h b/third_party/sipcc/sdp_os_defs.h
index 16c9b33329..df38d9336c 100644
--- a/third_party/sipcc/sdp_os_defs.h
+++ b/third_party/sipcc/sdp_os_defs.h
@@ -20,8 +20,5 @@
typedef uint8_t tinybool;
typedef unsigned short ushort;
typedef unsigned long ulong;
-#ifndef __GNUC_STDC_INLINE__
-#define inline
-#endif
#endif /* _SDP_OS_DEFS_H_ */
--
2.34.1

View File

@ -1,58 +0,0 @@
From 4d5eb53fa2ca9eeeadbfcd2be832aa8e97d413fc Mon Sep 17 00:00:00 2001
From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Date: Mon, 6 Apr 2020 19:17:43 +0200
Subject: [PATCH 03/30] Check additional plugins dir
Check original plugins dir along with default plugins dir.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
xpcom/io/nsAppFileLocationProvider.cpp | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/xpcom/io/nsAppFileLocationProvider.cpp b/xpcom/io/nsAppFileLocationProvider.cpp
index ef974f9904..6261eafcc8 100644
--- a/xpcom/io/nsAppFileLocationProvider.cpp
+++ b/xpcom/io/nsAppFileLocationProvider.cpp
@@ -50,6 +50,7 @@
# define NS_MACOSX_LOCAL_PLUGIN_DIR "OSXLocalPlugins"
#elif XP_UNIX
# define NS_SYSTEM_PLUGINS_DIR "SysPlugins"
+# define NS_SYSTEM_NSBROWSER_PLUGINS_DIR "SysNsBrowserPlugins"
#endif
#define DEFAULTS_DIR_NAME "defaults"_ns
@@ -172,6 +173,21 @@ nsAppFileLocationProvider::GetFile(const char* aProp, bool* aPersistent,
getter_AddRefs(localFile));
# else
rv = NS_ERROR_FAILURE;
+# endif
+ } else if (nsCRT::strcmp(aProp, NS_SYSTEM_NSBROWSER_PLUGINS_DIR) == 0) {
+# ifdef ENABLE_SYSTEM_EXTENSION_DIRS
+ static const char* const sysLPlgDir =
+# if defined(HAVE_USR_LIB64_DIR) && defined(__LP64__)
+ "/usr/lib64/nsbrowser/plugins";
+# elif defined(__OpenBSD__) || defined(__FreeBSD__)
+ "/usr/local/lib/nsbrowser/plugins";
+# else
+ "/usr/lib/nsbrowser/plugins";
+# endif
+ rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir), false,
+ getter_AddRefs(localFile));
+# else
+ rv = NS_ERROR_FAILURE;
# endif
}
# endif
@@ -418,7 +434,7 @@ nsAppFileLocationProvider::GetFiles(const char* aProp,
#else
# ifdef XP_UNIX
static const char* keys[] = {NS_USER_PLUGINS_DIR, NS_SYSTEM_PLUGINS_DIR,
- nullptr};
+ NS_SYSTEM_NSBROWSER_PLUGINS_DIR, nullptr};
# else
static const char* keys[] = {NS_USER_PLUGINS_DIR, nullptr};
# endif
--
2.34.1

View File

@ -1,181 +0,0 @@
From 61e8f03c526a40dda89b57aad6aec3f37d7125cd Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Mon, 6 Apr 2020 19:32:39 +0200
Subject: [PATCH 04/30] bmo#847568: Support system harfbuzz
Allow building against system-wide harfbuzz.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=847568
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
config/system-headers.mozbuild | 7 +++++++
dom/base/moz.build | 3 +++
gfx/moz.build | 4 +++-
gfx/skia/generate_mozbuild.py | 3 +++
gfx/skia/moz.build | 3 +++
gfx/thebes/moz.build | 3 +++
intl/unicharutil/util/moz.build | 3 +++
netwerk/dns/moz.build | 3 +++
toolkit/library/moz.build | 3 +++
toolkit/moz.configure | 9 +++++++++
10 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
index ae0c9d6d7c..44d08cf06b 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -1237,6 +1237,13 @@ if CONFIG['OS_TARGET'] == 'Android':
'vr/gvr/capi/include/gvr.h',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ system_headers += [
+ 'harfbuzz/hb-glib.h',
+ 'harfbuzz/hb-ot.h',
+ 'harfbuzz/hb.h',
+ ]
+
if CONFIG['MOZ_JACK']:
system_headers += [
'jack/jack.h',
diff --git a/dom/base/moz.build b/dom/base/moz.build
index d390adfc49..4508f19cb6 100644
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -567,6 +567,9 @@ FINAL_LIBRARY = "xul"
if CONFIG["MOZ_X11"]:
CXXFLAGS += CONFIG["TK_CFLAGS"]
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
+
GeneratedFile(
"UseCounterList.h",
script="gen-usecounters.py",
diff --git a/gfx/moz.build b/gfx/moz.build
index 4d6d63da9d..8222b72333 100644
--- a/gfx/moz.build
+++ b/gfx/moz.build
@@ -10,6 +10,9 @@ with Files("**"):
with Files("wr/**"):
BUG_COMPONENT = ("Core", "Graphics: WebRender")
+if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ DIRS += ["harfbuzz/src"]
+
DIRS += [
"cairo",
"2d",
@@ -20,7 +23,6 @@ DIRS += [
"gl",
"layers",
"graphite2/src",
- "harfbuzz/src",
"ots/src",
"thebes",
"ipc",
diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
index 5e0fd17d79..860b80af4f 100755
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
index 524bd28dac..615c93b266 100755
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -488,6 +488,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
index baa6f090a9..c51c36e2b4 100644
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -288,6 +288,9 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
DEFINES["GRAPHITE2_STATIC"] = True
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
+
if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
# Suppress warnings from Skia header files.
SOURCES["gfxPlatform.cpp"].flags += ["-Wno-implicit-fallthrough"]
diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build
index 301eb9a854..7cece5e06c 100644
--- a/intl/unicharutil/util/moz.build
+++ b/intl/unicharutil/util/moz.build
@@ -25,6 +25,9 @@ UNIFIED_SOURCES += [
"nsUnicodeProperties.cpp",
]
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
+
include("/ipc/chromium/chromium-config.mozbuild")
GeneratedFile(
diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build
index f769e270fa..8f64710257 100644
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -109,4 +109,7 @@ LOCAL_INCLUDES += [
"/netwerk/protocol/http",
]
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
+
USE_LIBS += ["icu"]
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
index 2c3f86948e..dd6901ba9a 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -260,6 +260,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]:
"-lgvr",
]
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
+
if CONFIG["MOZ_SYSTEM_JPEG"]:
OS_LIBS += CONFIG["MOZ_JPEG_LIBS"]
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index 00698656f6..1843188d11 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -460,6 +460,15 @@ add_old_configure_assignment(
)
set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True))
+# HarfBuzz
+# ==============================================================
+option('--with-system-harfbuzz', help="Use system harfbuzz (located with pkgconfig)")
+
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.7.4',
+ when='--with-system-harfbuzz')
+
+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
+
# Apple platform decoder support
# ==============================================================
@depends(toolkit)
--
2.34.1

View File

@ -1,208 +0,0 @@
From a7761d4886498eaa0e83d1c9b4399632cdbf314e Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Mon, 6 Apr 2020 19:34:44 +0200
Subject: [PATCH 05/30] bmo#847568: Support system graphite2
Allow building against system-wide graphite2.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=847568
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
config/system-headers.mozbuild | 6 ++++++
gfx/graphite2/geckoextra/moz.build | 21 +++++++++++++++++++++
gfx/graphite2/moz-gr-update.sh | 7 ++++++-
gfx/moz.build | 6 +++++-
gfx/thebes/moz.build | 5 ++++-
old-configure.in | 21 +++++++++++++++++++++
toolkit/library/moz.build | 3 +++
toolkit/moz.configure | 13 +++++++++++++
8 files changed, 79 insertions(+), 3 deletions(-)
create mode 100644 gfx/graphite2/geckoextra/moz.build
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
index 44d08cf06b..2f7ae39515 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -1244,6 +1244,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
'harfbuzz/hb.h',
]
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
+ system_headers += [
+ 'graphite2/Font.h',
+ 'graphite2/Segment.h',
+ ]
+
if CONFIG['MOZ_JACK']:
system_headers += [
'jack/jack.h',
diff --git a/gfx/graphite2/geckoextra/moz.build b/gfx/graphite2/geckoextra/moz.build
new file mode 100644
index 0000000000..24e8d7a032
--- /dev/null
+++ b/gfx/graphite2/geckoextra/moz.build
@@ -0,0 +1,21 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+EXPORTS.graphite2 += [
+ 'include/GraphiteExtra.h',
+ 'include/GraphiteStructsForRLBox.h',
+]
+
+UNIFIED_SOURCES += [
+ '../geckoextra/src/GraphiteExtra.cpp',
+]
+
+CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
+
+# Match bundled graphite2 configuration
+AllowCompilerWarnings()
+
+FINAL_LIBRARY = 'gkmedias'
diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh
index b91d9c161c..a97e6eb203 100755
--- a/gfx/graphite2/moz-gr-update.sh
+++ b/gfx/graphite2/moz-gr-update.sh
@@ -1,6 +1,7 @@
#!/bin/bash
# Script used to update the Graphite2 library in the mozilla source tree
+# and bump version for --with-system-graphite2
# This script lives in gfx/graphite2, along with the library source,
# but must be run from the top level of the mozilla-central tree.
@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+# chase version for --with-system-graphite2
+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
+ if /GR2_VERSION_REQUIRE/" old-configure.in
+
# summarize what's been touched
echo Updated to $RELEASE.
echo Here is what changed in the gfx/graphite2 directory:
echo
-hg stat gfx/graphite2
+hg stat old-configure.in gfx/graphite2
echo
echo If gfx/graphite2/src/files.mk has changed, please make corresponding
diff --git a/gfx/moz.build b/gfx/moz.build
index 8222b72333..16a2b401db 100644
--- a/gfx/moz.build
+++ b/gfx/moz.build
@@ -10,6 +10,11 @@ with Files("**"):
with Files("wr/**"):
BUG_COMPONENT = ("Core", "Graphics: WebRender")
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
+ DIRS += ["graphite2/geckoextra"]
+else:
+ DIRS += ["graphite2/src"]
+
if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
DIRS += ["harfbuzz/src"]
@@ -22,7 +27,6 @@ DIRS += [
"qcms",
"gl",
"layers",
- "graphite2/src",
"ots/src",
"thebes",
"ipc",
diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
index c51c36e2b4..4f02a9e2a5 100644
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -286,7 +286,10 @@ if CONFIG["MOZ_WAYLAND"]:
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
-DEFINES["GRAPHITE2_STATIC"] = True
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
+ CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
+else:
+ DEFINES["GRAPHITE2_STATIC"] = True
if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
diff --git a/old-configure.in b/old-configure.in
index f69f5f5456..1c1c8ecef3 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2204,6 +2204,27 @@ if test "$USE_FC_FREETYPE"; then
fi
fi
+dnl ========================================================
+dnl Check for graphite2
+dnl ========================================================
+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
+ dnl graphite2.pc has bogus version, check manually
+ _SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
+ * 100 + GR2_VERSION_BUGFIX >= \
+ (major) * 10000 + (minor) * 100 + (bugfix) )
+ ], [
+ #if !GR2_VERSION_REQUIRE(1,3,8)
+ #error "Insufficient graphite2 version."
+ #endif
+ ], [],
+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
+ CFLAGS=$_SAVE_CFLAGS
+fi
+
dnl ========================================================
dnl Check if we need the 32-bit Linux SSE2 error dialog
dnl ========================================================
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
index dd6901ba9a..be73ac4bee 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -260,6 +260,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]:
"-lgvr",
]
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
+ OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"]
+
if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index 1843188d11..a68e1b347d 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -460,6 +460,19 @@ add_old_configure_assignment(
)
set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True))
+# Graphite2
+# ==============================================================
+option('--with-system-graphite2', help="Use system graphite2 (located with pkgconfig)")
+
+@depends('--with-system-graphite2')
+def check_for_graphite2(value):
+ return bool(value)
+
+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
+ when=check_for_graphite2)
+
+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
+
# HarfBuzz
# ==============================================================
option('--with-system-harfbuzz', help="Use system harfbuzz (located with pkgconfig)")
--
2.34.1

View File

@ -1,114 +0,0 @@
From 8a4627c0c910415b00bebeb976dc6ea8c3e0d5d0 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Mon, 6 Apr 2020 19:36:02 +0200
Subject: [PATCH 06/30] bmo#1559213: Support system av1
Allow building against system-wide av1.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559213
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
config/external/moz.build | 5 +++--
config/system-headers.mozbuild | 8 ++++++++
dom/media/platforms/moz.build | 5 +++++
toolkit/moz.configure | 20 ++++++++++++++++++--
4 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/config/external/moz.build b/config/external/moz.build
index ab771212bf..75595d999c 100644
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
external_dirs += ["media/libvpx"]
if CONFIG["MOZ_AV1"]:
- external_dirs += ["media/libaom"]
- external_dirs += ["media/libdav1d"]
+ if not CONFIG["MOZ_SYSTEM_AV1"]:
+ external_dirs += ["media/libaom"]
+ external_dirs += ["media/libdav1d"]
if not CONFIG["MOZ_SYSTEM_PNG"]:
external_dirs += ["media/libpng"]
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
index 2f7ae39515..96ab3a6466 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -1301,6 +1301,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
'proxy.h',
]
+if CONFIG['MOZ_SYSTEM_AV1']:
+ system_headers += [
+ 'aom/aom_decoder.h',
+ 'aom/aomdx.h',
+ 'aom/aom_image.h',
+ 'dav1d/dav1d.h',
+ ]
+
if CONFIG['MOZ_SYSTEM_LIBVPX']:
system_headers += [
'vpx_mem/vpx_mem.h',
diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
index 8509aec6ef..7c5a1df63d 100644
--- a/dom/media/platforms/moz.build
+++ b/dom/media/platforms/moz.build
@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]:
"agnostic/AOMDecoder.cpp",
"agnostic/DAV1DDecoder.cpp",
]
+ if CONFIG["MOZ_SYSTEM_AV1"]:
+ CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBAOM_CFLAGS"]
+ OS_LIBS += CONFIG["MOZ_SYSTEM_LIBAOM_LIBS"]
+ CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBDAV1D_CFLAGS"]
+ OS_LIBS += CONFIG["MOZ_SYSTEM_LIBDAV1D_LIBS"]
if CONFIG["MOZ_OMX"]:
EXPORTS += [
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index a68e1b347d..7b7975bd12 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -544,14 +544,29 @@ def av1(value):
if value:
return True
+option("--with-system-av1", help="Use system av1 (located with pkg-config)")
-@depends(target, when=av1 & compile_environment)
+system_libaom_info = pkg_check_modules('MOZ_SYSTEM_LIBAOM', 'aom >= 1.0.0',
+ when='--with-system-av1')
+
+system_libdav1d_info = pkg_check_modules('MOZ_SYSTEM_LIBDAV1D', 'dav1d >= 0.1.1',
+ when='--with-system-av1')
+
+@depends(system_libaom_info, system_libdav1d_info)
+def system_av1(system_libaom_info, system_libdav1d_info):
+ has_av1_libs = False
+ if system_libaom_info and system_libdav1d_info:
+ has_av1_libs = True
+ return has_av1_libs
+
+
+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
def dav1d_asm(target):
if target.cpu in ("aarch64", "x86", "x86_64"):
return True
-@depends(target, when=av1 & compile_environment)
+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
def dav1d_nasm(target):
if target.cpu in ("x86", "x86_64"):
return namespace(version="2.14", what="AV1")
@@ -561,6 +576,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
set_define("MOZ_DAV1D_ASM", dav1d_asm)
set_config("MOZ_AV1", av1)
set_define("MOZ_AV1", av1)
+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
# JXL Image Codec Support
# ==============================================================
--
2.34.1

View File

@ -1,36 +0,0 @@
From e43f7431036904989cfd520f19de28a72be97ad9 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Mon, 6 Apr 2020 19:41:43 +0200
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
Bug: https://bugs.gentoo.org/654316
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
third_party/python/blessings/blessings/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/third_party/python/blessings/blessings/__init__.py b/third_party/python/blessings/blessings/__init__.py
index 388cece0b8..1283460cc9 100644
--- a/third_party/python/blessings/blessings/__init__.py
+++ b/third_party/python/blessings/blessings/__init__.py
@@ -94,8 +94,13 @@ class Terminal(object):
# init sequences to the stream if it has a file descriptor, and
# send them to stdout as a fallback, since they have to go
# somewhere.
- setupterm(kind or environ.get('TERM', 'unknown'),
- self._init_descriptor)
+ try:
+ setupterm(kind or environ.get('TERM', 'dumb') or 'dumb',
+ self._init_descriptor)
+ except curses.error:
+ # There was an error setting up the terminal, either curses is
+ # not supported or TERM is incorrectly set. Fall back to dumb.
+ self._does_styling = False
self.stream = stream
--
2.34.1

View File

@ -1,28 +0,0 @@
From 6eeeca1b673a60d3e51427b2a5cf3e916bdb012b Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Mon, 6 Apr 2020 19:44:28 +0200
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
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
security/sandbox/linux/moz.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
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"):
# 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"]
+ LDFLAGS += ["--param", "lto-partitions=1"]
DEFINES["NS_NO_XPCOM"] = True
DisableStlWrapping()
--
2.34.1

View File

@ -1,35 +0,0 @@
From d8ec0bd6f3b0ad2dfd8a97a864f08decaafdea69 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@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@sholland.org>
Signed-off-by: Thomas Deutschmann <whissi@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

View File

@ -1,42 +0,0 @@
From 1b46c0fc085fe93c36320d7ac1004c83efccdccc Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@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@sholland.org>
Signed-off-by: Thomas Deutschmann <whissi@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

View File

@ -1,33 +0,0 @@
From 68dd87a3dc06cf59396dccc3e031761f7237656e Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@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@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

View File

@ -1,29 +0,0 @@
From 70d47d18420fe9e3de8f896c08f97ef2596c9c84 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@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@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

View File

@ -1,28 +0,0 @@
From 3283cc3981f99894dec1219fbf380489905827a9 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@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@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

View File

@ -1,51 +0,0 @@
From beed745f96bbc18a3c22a728095c9a2eef7435ee Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@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@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

View File

@ -1,28 +0,0 @@
From 6d36ed9e971861321bb381e25516500069314eb6 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@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@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

View File

@ -1,27 +0,0 @@
From 08a7a0d7fa52e1bdacdcb47e847cf5ecd980ee6f Mon Sep 17 00:00:00 2001
From: Rasmus Thomsen <oss@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@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

View File

@ -1,33 +0,0 @@
From 45d43bb2dc1c1c033c860951c93261e98647f851 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,55 +0,0 @@
From 2502829abc1a02a08cc1934538c3d30e6f4f6fae Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,32 +0,0 @@
From 0501ed4bbdbf8d16a69a4460d2ada33ac259365d Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,84 +0,0 @@
From 98e1e605c8fdf7b021d6f1888ce6baed5c1097b5 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,28 +0,0 @@
From 6e220b49aee7dbdcafd255f6260517c5c551f9b1 Mon Sep 17 00:00:00 2001
From: Mike Hommey <mh@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@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

View File

@ -1,13 +0,0 @@
diff -Naur a/build/moz.configure/warnings.configure b/build/moz.configure/warnings.configure
--- a/build/moz.configure/warnings.configure 2022-05-27 02:16:52.000000000 +0300
+++ b/build/moz.configure/warnings.configure 2022-05-31 10:48:22.990378071 +0300
@@ -293,7 +293,8 @@
check_and_add_warning("-Wno-gnu-zero-variadic-macro-arguments")
# Make it an error to be missing function declarations for C code.
-check_and_add_warning("-Werror=implicit-function-declaration", c_compiler)
+check_and_add_warning("-Werror=implicit-function-declaration",
+ when="--enable-warnings-as-errors")
# New in clang 11. We can't really do anything about this warning.
check_and_add_warning("-Wno-psabi")

View File

@ -1,34 +0,0 @@
From 685e82ac82921720c6cd9c6c45703ff034f081e7 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,36 +0,0 @@
From 58b0385412c6d96eb745e2fc5902df347e629f6d Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,96 +0,0 @@
From 0b53fcfa8ee76ccc2d77abb947810f631efaecd9 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@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@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

View File

@ -1,37 +0,0 @@
diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h
--- firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 2022-06-08 23:06:36.000000000 +0200
+++ firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h 2022-06-09 17:17:04.775008085 +0200
@@ -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 -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
--- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 2022-06-08 16:10:21.000000000 +0200
+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp 2022-06-09 20:31:25.120035588 +0200
@@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule
media::DecodeSupportSet GMPDecoderModule::SupportsMimeType(
const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const {
+ if (MP4Decoder::IsH264(aMimeType)) {
+ return media::DecodeSupport::SoftwareDecode;
+ }
return media::DecodeSupport::Unsupported;
}
diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
--- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 2022-06-08 16:10:21.000000000 +0200
+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp 2022-06-09 17:17:04.776008117 +0200
@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4
RefPtr<GMPVideoDecoder> self = this;
if (v) {
mDecodedData.AppendElement(std::move(v));
+ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
+ mDecodedData = DecodedData();
} else {
mDecodedData.Clear();
mDecodePromise.RejectIfExists(

View File

@ -1,16 +0,0 @@
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
index 51d79f9c2ec59..fafd7d6fc1e0d 100644
--- a/modules/fdlibm/src/math_private.h
+++ b/modules/fdlibm/src/math_private.h
@@ -30,7 +30,11 @@
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
*/
+#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
+typedef long double __double_t;
+#else
typedef double __double_t;
+#endif
typedef __double_t double_t;
/*

View File

@ -1,22 +0,0 @@
diff --git a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build
index 0069865..e806fc8 100644
--- a/media/ffvpx/libavcodec/moz.build
+++ b/media/ffvpx/libavcodec/moz.build
@@ -112,9 +112,15 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
'vaapi_vp8.c',
'vaapi_vp9.c',
]
+ if CONFIG["MOZ_SYSTEM_AV1"]:
+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
+ else:
+ USE_LIBS += [
+ 'dav1d',
+ 'media_libdav1d_asm',
+ ]
USE_LIBS += [
- 'dav1d',
- 'media_libdav1d_asm',
'mozva'
]

View File

@ -1,13 +0,0 @@
diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777 firefox-100.0/widget/gtk/nsWindow.cpp
--- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02 11:29:06.763325015 +0200
+++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334 +0200
@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SCROLL_MASK |
- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK;
+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK |
+ GDK_FOCUS_CHANGE_MASK;
/* utility functions */
static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX,

View File

@ -1,69 +0,0 @@
--- a/memory/mozalloc/throw_gcc.h 2022-02-02 17:33:38 UTC
+++ b/memory/mozalloc/throw_gcc.h
@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
mozalloc_abort("fatal: STL threw bad_function_call");
}
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_logic_error(
const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_domain_error(
const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_invalid_argument(const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_length_error(
const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range(
const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_runtime_error(
const char* msg) {
mozalloc_abort(msg);
}
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_range_error(
const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_overflow_error(const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
+#if !defined(_LIBCPP_VERSION)
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_underflow_error(const char* msg) {
mozalloc_abort(msg);
}
+#endif // _LIBCPP_VERSION
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_ios_failure(
const char* msg) {

View File

@ -1,30 +0,0 @@
# https://src.fedoraproject.org/rpms/firefox/c/4d45de9bff7b7ef01f7d3c9e53a61adc9cf3ce9e?branch=4d45de9bff7b7ef01f7d3c9e53a61adc9cf3ce9e
diff -up firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py.build-python-3.11 firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py
--- firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py.build-python-3.11 2022-06-23 09:10:31.000000000 +0200
+++ firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py 2022-07-15 16:18:52.048351493 +0200
@@ -1572,13 +1572,13 @@ class IDLParser(object):
t_ignore = " \t"
def t_multilinecomment(self, t):
- r"/\*(?s).*?\*/"
+ r"/\*(?s:.)*?\*/"
t.lexer.lineno += t.value.count("\n")
if t.value.startswith("/**"):
self._doccomments.append(t.value)
def t_singlelinecomment(self, t):
- r"(?m)//.*?$"
+ r"(?m://.*?$)"
def t_IID(self, t):
return t
@@ -1591,7 +1591,7 @@ class IDLParser(object):
return t
def t_LCDATA(self, t):
- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?"
+ r"(?s:%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?)"
t.type = "CDATA"
t.value = t.lexer.lexmatch.group("cdata")
t.lexer.lineno += t.value.count("\n")

View File

@ -1,20 +0,0 @@
diff -up firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp.firefox-enable-vaapi firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp
diff -up firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-104.0/widget/gtk/GfxInfo.cpp
--- firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2022-08-16 15:14:53.014042400 +0200
+++ firefox-104.0/widget/gtk/GfxInfo.cpp 2022-08-16 15:15:30.482301677 +0200
@@ -873,15 +873,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", "");
- // Disable on Release/late Beta
-#if !defined(EARLY_BETA_OR_EARLIER)
- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All,
- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
- nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", "");
-#endif
-
////////////////////////////////////
// FEATURE_WEBRENDER_PARTIAL_PRESENT
APPEND_TO_DRIVER_BLOCKLIST_EXT(

View File

@ -1,49 +0,0 @@
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -2353,18 +2353,6 @@ with only_when(compile_environment & tar
)
set_config("MOZ_D3DCOMPILER_VISTA_DLL_PATH", d3d_compiler_dll.path)
-# Remoting protocol support
-# ==============================================================
-
-
-@depends(toolkit)
-def has_remote(toolkit):
- if toolkit in ("gtk", "windows", "cocoa"):
- return True
-
-
-set_config("MOZ_HAS_REMOTE", has_remote)
-set_define("MOZ_HAS_REMOTE", has_remote)
# RLBox Library Sandboxing wasm support
# ==============================================================
@@ -2900,6 +2888,26 @@ with only_when(toolkit_gtk):
set_config("MOZ_ENABLE_DBUS", True)
set_define("MOZ_ENABLE_DBUS", True)
+# Remoting protocol support
+# ==============================================================
+
+@depends(
+ toolkit,
+ depends("--enable-dbus", when=toolkit_gtk)(lambda x: x),
+ depends(wayland_headers, when=toolkit_gtk)(lambda x: x),
+ depends(x11_headers, when=toolkit_gtk)(lambda x: x),
+)
+def has_remote(toolkit, dbus, wayland, x11):
+ if toolkit in ("windows", "cocoa"):
+ return True
+ if toolkit == "gtk":
+ if not dbus and wayland and not x11:
+ return
+ return True
+
+
+set_config("MOZ_HAS_REMOTE", has_remote)
+set_define("MOZ_HAS_REMOTE", has_remote)
# Necko's wifi scanner
# ==============================================================

View File

@ -1,49 +1,15 @@
# Description: The Mozilla Firefox browser with Alsa support
# URL: https://www.mozilla.com/firefox/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: alsa-lib autoconf-2.13 brotli cbindgen dav1d dbus-glib ffmpeg graphite2 libaom libdav1d libevent libnotify libvpx libwebp libxkbcommon lld nodejs pulseaudio nss unzip wasi-libc++ xorg-libxcomposite xorg-libxcursor xorg-libxinerama xorg-libxt zip
# Depends on: autoconf-2.13 brotli cbindgen dav1d dbus-glib ffmpeg graphite2 libaom libdav1d libevent libnotify libvpx libwebp libxkbcommon lld nodejs nss pulseaudio unzip wasi-libc++ xorg-libxcomposite xorg-libxcursor xorg-libxinerama xorg-libxt zip
# Optional: sccache jack pipewire
name=firefox
version=105.0.1
version=106.0.1
release=1
source=(https://archive.mozilla.org/pub/firefox/releases/$version/source/$name-$version.source.tar.xz
firefox.desktop
node-stdout-nonblocking-wrapper
0001-Don-t-use-build-id.patch
0002-Fortify-sources-properly.patch
0003-Check-additional-plugins-dir.patch
0004-bmo-847568-Support-system-harfbuzz.patch
0005-bmo-847568-Support-system-graphite2.patch
0006-bmo-1559213-Support-system-av1.patch
0007-bmo-878089-Don-t-fail-when-TERM-is-not-set.patch
0008-bmo-1516803-Fix-building-sandbox.patch
0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
0010-musl-Fix-syscall-wrappers.patch
0011-musl-Only-use-system-heap-reporter-with-glibc.patch
0012-musl-Set-pthread-name-for-non-glibc-systems.patch
0013-musl-getcontext-is-only-avaliable-on-glibc-systems.patch
0014-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch
0015-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch
0016-musl-include-net-if.h-before-linux-if.h-to-avoid-red.patch
0017-Make-PGO-use-toolchain.patch
0018-bmo-1516081-Disable-watchdog-during-PGO-builds.patch
0019-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch
0020-Fix-building-with-PGO-when-using-GCC.patch
0021-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
0022-build-Disable-Werror.patch
0023-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
0025-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
0026-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
0027-bgo-816975-fix-build-on-x86.patch
0028-bmo-1559213-fix-system-av1-libs.patch
0029-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
0030-bmo-1754469-memory_mozalloc_throw.patch
0031-bmo-1769631-python-3.11-compatibility.patch
0033-rhbz-2115253-vaapi-fixes.patch
0034-bgo-860033-firefox-wayland-no-dbus.patch
libwebrtc-screen-cast-sync-1.patch
no-ccache-stats.patch)
_clear_vendor_checksums() {
@ -78,9 +44,9 @@ cat <<- EOF > .mozconfig
unset MOZ_TELEMETRY_REPORTING
ac_add_options --prefix=/usr
ac_add_options --enable-application=browser
ac_add_options --with-system-harfbuzz
#ac_add_options --with-system-harfbuzz
#ac_add_options --with-system-graphite2
ac_add_options --with-system-av1
#ac_add_options --with-system-av1
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-png
@ -137,7 +103,7 @@ EOF
ln -s /usr/bin/pip3 $SRC/bin/pip
ln -s /usr/bin/python3 $SRC/bin/python
export PATH="$SRC/bin:$PATH"
# Show flags set at the beginning
echo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
echo "Current CFLAGS:\t\t${CFLAGS:-no value set}"

View File

@ -1,16 +0,0 @@
Description: Remove an extra constant definition that is now being generated by newer versions of cbindgen (0.24), and causing build failures because it is defined in several places.
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1773259
Forwarded: not-needed
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -73,8 +73,6 @@ struct WrPipelineInfo;
struct WrPipelineIdAndEpoch;
using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;
-const uint64_t ROOT_CLIP_CHAIN = ~0;
-
} // namespace wr
} // namespace mozilla

File diff suppressed because it is too large Load Diff