sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (39d83bc179ba2da2b07ded251d596e7549efd056)
- From: Pavel Vinogradov <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (39d83bc179ba2da2b07ded251d596e7549efd056)
- Date: Fri, 30 May 2025 14:54:24 +0000
GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:
http/firefox/DETAILS
| 2
http/firefox/HISTORY
| 4
http/firefox/patches/0012-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 +
http/firefox/patches/0012-bmo-1754469-memory_mozalloc_throw.patch
| 69 ----
http/firefox/patches/0013-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 -
http/firefox/patches/0013-gcc-lto-pgo-gentoo.patch
| 157 ++++++++++
http/firefox/patches/0014-bgo-748849-RUST_TARGET_override.patch
| 61 +++
http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
| 157 ----------
http/firefox/patches/0015-bgo-748849-RUST_TARGET_override.patch
| 61 ---
http/firefox/patches/0015-bmo-1874059-fix-libcxx-18.patch
| 16 +
http/firefox/patches/0016-bmo-1874059-fix-libcxx-18.patch
| 16 -
http/firefox/patches/0016-dont-use-build-id.patch
| 13
http/firefox/patches/0017-bgo-929967-fix-pgo-on-musl.patch
| 14
http/firefox/patches/0017-dont-use-build-id.patch
| 13
http/firefox/patches/0018-bgo-929967-fix-pgo-on-musl.patch
| 14
http/firefox/patches/0018-gcc-always-inline-from-fedora.patch
| 14
http/firefox/patches/0019-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 57 +++
http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
| 14
http/firefox/patches/0020-bgo-940031-wasm-support.patch
| 12
http/firefox/patches/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 57 ---
http/firefox/patches/0021-bgo-928126-enable-jxl.patch
| 21 +
http/firefox/patches/0021-bgo-940031-wasm-support.patch
| 12
http/firefox/patches/0022-bgo-928126-enable-jxl.patch
| 21 -
http/firefox/patches/0022-bmo-1953080-pipewire-includes.patch
| 12
24 files changed, 402 insertions(+), 455 deletions(-)
New commits:
commit 39d83bc179ba2da2b07ded251d596e7549efd056
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>
http/firefox: version 139.0.1
diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index 01f393a..f32ef58 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,5 +1,5 @@
SPELL=firefox
- VERSION=139.0
+ VERSION=139.0.1
SECURITY_PATCH=209
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index ea8732c..9a0d375 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,7 @@
+2025-05-30 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 139.0.1
+ * patches/*: updated
+
2025-05-26 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 139.0, SECURITY_PATCH++
* DEPENDS: fixed typo in libjxl flags
diff --git
a/http/firefox/patches/0012-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
b/http/firefox/patches/0012-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
new file mode 100644
index 0000000..bb0621a
--- /dev/null
+++
b/http/firefox/patches/0012-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
@@ -0,0 +1,20 @@
+--- a/security/sandbox/linux/Sandbox.cpp 2023-07-10 20:29:48.000000000 +0100
++++ b/security/sandbox/linux/Sandbox.cpp 2023-07-15 09:13:43.561724668
+0100
+@@ -18,6 +18,8 @@
+ #include <dirent.h>
+ #ifdef NIGHTLY_BUILD
+ # include "dlfcn.h"
++#else
++# include <dlfcn.h>
+ #endif
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -685,7 +687,7 @@
+ files->Add("/proc/stat", SandboxOpenedFile::Error{});
+ files->Add("/proc/net/unix", SandboxOpenedFile::Error{});
+ files->Add("/proc/self/maps", SandboxOpenedFile::Error{});
+-
++ Unused << dlopen("libgcc_s.so.1", RTLD_GLOBAL|RTLD_LAZY);
+ // Finally, start the sandbox.
+ SetCurrentProcessSandbox(GetMediaSandboxPolicy(files));
+ }
\ No newline at end of file
diff --git
a/http/firefox/patches/0012-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0012-bmo-1754469-memory_mozalloc_throw.patch
deleted file mode 100644
index 634892be..0000000
--- a/http/firefox/patches/0012-bmo-1754469-memory_mozalloc_throw.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/memory/mozalloc/throw_gcc.h 2022-02-02 17:33:38 UTC
-+++ b/memory/mozalloc/throw_gcc.h
-@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
- mozalloc_abort("fatal: STL threw bad_function_call");
- }
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_logic_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_domain_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_invalid_argument(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_length_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_out_of_range(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_runtime_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_range_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_overflow_error(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_underflow_error(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_ios_failure(
- const char* msg) {
diff --git
a/http/firefox/patches/0013-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
b/http/firefox/patches/0013-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0013-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/security/sandbox/linux/Sandbox.cpp 2023-07-10 20:29:48.000000000 +0100
-+++ b/security/sandbox/linux/Sandbox.cpp 2023-07-15 09:13:43.561724668
+0100
-@@ -18,6 +18,8 @@
- #include <dirent.h>
- #ifdef NIGHTLY_BUILD
- # include "dlfcn.h"
-+#else
-+# include <dlfcn.h>
- #endif
- #include <errno.h>
- #include <fcntl.h>
-@@ -685,7 +687,7 @@
- files->Add("/proc/stat", SandboxOpenedFile::Error{});
- files->Add("/proc/net/unix", SandboxOpenedFile::Error{});
- files->Add("/proc/self/maps", SandboxOpenedFile::Error{});
--
-+ Unused << dlopen("libgcc_s.so.1", RTLD_GLOBAL|RTLD_LAZY);
- // Finally, start the sandbox.
- SetCurrentProcessSandbox(GetMediaSandboxPolicy(files));
- }
\ No newline at end of file
diff --git a/http/firefox/patches/0013-gcc-lto-pgo-gentoo.patch
b/http/firefox/patches/0013-gcc-lto-pgo-gentoo.patch
new file mode 100644
index 0000000..4e876cf
--- /dev/null
+++ b/http/firefox/patches/0013-gcc-lto-pgo-gentoo.patch
@@ -0,0 +1,157 @@
+diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo
firefox-128.0/build/moz.configure/lto-pgo.configure
+--- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02
00:34:14.000000000 +0200
++++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02
17:59:44.425650444 +0200
+@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi
+
+ @depends(
+ "--enable-profile-use",
++ c_compiler,
+ pgo_profile_path,
+ llvm_profdata,
+ llvm_profdata_order,
+ build_environment,
+ )
+-def orderfile_path(profile_use, path, profdata, profdata_order, build_env):
++def orderfile_path(profile_use, compiler, path, profdata, profdata_order,
build_env):
++ if compiler.type == "gcc":
++ return None
++
+ if not profile_use:
+ return None
+
+@@ -133,7 +137,7 @@ def pgo_flags(
+ return namespace(
+ gen_cflags=["-fprofile-generate"],
+ gen_ldflags=["-fprofile-generate"],
+- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
++ use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wno-coverage-mismatch"],
+ use_ldflags=["-fprofile-use"],
+ )
+
+diff -up a/build/pgo/profileserver.py b/build/pgo/profileserver.py
+--- a/build/pgo/profileserver.py 2025-05-26 17:14:58.234802697 +0300
++++ b/build/pgo/profileserver.py 2025-05-26 17:18:38.000686313 +0300
+@@ -97,9 +97,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
+@@ -222,16 +235,21 @@
+
+ # Try to move the crash reports to the artifacts even if Firefox
appears
+ # to exit successfully, in case there's a crash that doesn't set the
+ # return code to non-zero for some reason.
+ if get_crashreports(profilePath, name="Firefox exited
successfully?") != 0:
+ print("Firefox exited successfully, but produced a crashreport")
+ sys.exit(1)
+
++ 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")
+ if not profraw_files:
+ print(
+ "Could not find profraw files in the current directory:
%s"
+ % os.getcwd()
+ )
+diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build
+--- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200
++++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200
+@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]:
+ # The file uses SSE2 intrinsics, so it needs special compile flags on
some
+ # compilers.
+ SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"]
++ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
+ SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"]
++ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
+ SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"]
+ elif CONFIG["TARGET_CPU"].startswith("mips"):
+diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo
firefox-128.0/gfx/skia/generate_mozbuild.py
+--- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02
17:59:44.425650444 +0200
++++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02
18:17:40.973081400 +0200
+@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
+ skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
+- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
+- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
+ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
+diff -up firefox-128.0/gfx/skia/moz.build.pgo
firefox-128.0/gfx/skia/moz.build
+--- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444
+0200
++++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200
+@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
+ skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
+- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
+- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
+ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
+diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
+--- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2024-07-02 00:34:32.000000000 +0200
++++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
2024-07-02 17:59:44.425650444 +0200
+@@ -332,6 +332,11 @@ void nsTerminator::StartWatchdog() {
+ }
+ #endif
+
++ // Disable watchdog for PGO train builds - writting profile information at
++ // exit may take time and it is better to make build hang rather than
++ // silently produce poorly performing binary.
++ crashAfterMS = INT32_MAX;
++
+ UniquePtr<Options> options(new Options());
+ // crashAfterTicks is guaranteed to be > 0 as
+ // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
+diff -up firefox-84.0/security/sandbox/linux/moz.build.1516803
firefox-84.0/security/sandbox/linux/moz.build
+--- firefox-84.0/security/sandbox/linux/moz.build.1516803 2020-12-10
16:17:55.425139545 +0100
++++ firefox-84.0/security/sandbox/linux/moz.build 2020-12-10
16:29:21.945860841 +0100
+@@ -114,9 +114,8 @@ 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':
++ LDFLAGS += ['--param', 'lto-partitions=1']
+
+ DEFINES["NS_NO_XPCOM"] = True
+ DisableStlWrapping()
+
diff --git a/http/firefox/patches/0014-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0014-bgo-748849-RUST_TARGET_override.patch
new file mode 100644
index 0000000..f109538
--- /dev/null
+++ b/http/firefox/patches/0014-bgo-748849-RUST_TARGET_override.patch
@@ -0,0 +1,61 @@
+From: Sam James <sam AT gentoo.org>
+Subject: Allow RUST_TARGET override for detected Rust triplet (fixes musl
build)
+
+Respect RUST_TARGET from the environment to override Mozilla's
+own triplet detection.
+
+If the variable is unset, the old logic is used.
+
+The issue is that Gentoo supports both, say:
+- x86_64-unknown-linux-musl, and
+- x86-64-gentoo-linux-musl
+
+Our Rust is built to understand
+-gentoo- as a vendor target, but
+our Rust only actually includes
+-unknown-.
+
+Mozilla's configure sees -gentoo-
+in CHOST and that Rust _understands_
+-gentoo- and tries to use it, without
+verifying that we actually have
+-gentoo- installed as a Rust target.
+
+This requires exporting RUST_TARGET
+in the ebuild, possibly like:
+````
+inherit rust-toolchain
+
+src_configure() {
+ [...]
+ export RUST_TARGET=$(rust_abi)
+ [...]
+}
+````
+
+Inspired by Alpine's patch at
+https://git.alpinelinux.org/aports/tree/community/firefox/fix-rust-target.patch?id=740922900cf8042be6751fcfcccdd3fc11bd77d3.
+
+Bug: https://bugs.gentoo.org/748849
+Bug: https://bugs.gentoo.org/779178
+Bug: https://bugs.gentoo.org/836226
+Thanks-to: Georgy Yakovlev <gyakovlev AT gentoo.org>
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -275,6 +275,7 @@ def rust_supported_targets(rustc):
+ return data
+
+
++@imports('os')
+ def detect_rustc_target(
+ host_or_target, compiler_info, arm_target, rust_supported_targets
+ ):
+@@ -396,7 +397,7 @@ def detect_rustc_target(
+
+ return None
+
+- rustc_target = find_candidate(candidates)
++ rustc_target = os.environ.get('RUST_TARGET', find_candidate(candidates))
+
+ if rustc_target is None:
+ die("Don't know how to translate {} for
rustc".format(host_or_target.alias))
diff --git a/http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
b/http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
deleted file mode 100644
index 0f9667c..0000000
--- a/http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo
firefox-128.0/build/moz.configure/lto-pgo.configure
---- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02
00:34:14.000000000 +0200
-+++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02
17:59:44.425650444 +0200
-@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi
-
- @depends(
- "--enable-profile-use",
-+ c_compiler,
- pgo_profile_path,
- llvm_profdata,
- llvm_profdata_order,
- build_environment,
- )
--def orderfile_path(profile_use, path, profdata, profdata_order, build_env):
-+def orderfile_path(profile_use, compiler, path, profdata, profdata_order,
build_env):
-+ if compiler.type == "gcc":
-+ return None
-+
- if not profile_use:
- return None
-
-@@ -133,7 +137,7 @@ def pgo_flags(
- return namespace(
- gen_cflags=["-fprofile-generate"],
- gen_ldflags=["-fprofile-generate"],
-- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
-+ use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wno-coverage-mismatch"],
- use_ldflags=["-fprofile-use"],
- )
-
-diff -up a/build/pgo/profileserver.py b/build/pgo/profileserver.py
---- a/build/pgo/profileserver.py 2025-05-26 17:14:58.234802697 +0300
-+++ b/build/pgo/profileserver.py 2025-05-26 17:18:38.000686313 +0300
-@@ -97,9 +97,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
-@@ -222,16 +235,21 @@
-
- # Try to move the crash reports to the artifacts even if Firefox
appears
- # to exit successfully, in case there's a crash that doesn't set the
- # return code to non-zero for some reason.
- if get_crashreports(profilePath, name="Firefox exited
successfully?") != 0:
- print("Firefox exited successfully, but produced a crashreport")
- sys.exit(1)
-
-+ 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")
- if not profraw_files:
- print(
- "Could not find profraw files in the current directory:
%s"
- % os.getcwd()
- )
-diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build
---- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200
-+++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200
-@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]:
- # The file uses SSE2 intrinsics, so it needs special compile flags on
some
- # compilers.
- SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
-- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"]
-+ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
- SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
-- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"]
-+ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
- SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"]
- elif CONFIG["TARGET_CPU"].startswith("mips"):
-diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo
firefox-128.0/gfx/skia/generate_mozbuild.py
---- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02
17:59:44.425650444 +0200
-+++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02
18:17:40.973081400 +0200
-@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
- if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
- skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
-- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
-- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
-+ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
-+ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
- SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
-diff -up firefox-128.0/gfx/skia/moz.build.pgo
firefox-128.0/gfx/skia/moz.build
---- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444
+0200
-+++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200
-@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
- if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
- skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
-- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
-- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
-+ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
-+ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
- SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
-diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
---- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2024-07-02 00:34:32.000000000 +0200
-+++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
2024-07-02 17:59:44.425650444 +0200
-@@ -332,6 +332,11 @@ void nsTerminator::StartWatchdog() {
- }
- #endif
-
-+ // Disable watchdog for PGO train builds - writting profile information at
-+ // exit may take time and it is better to make build hang rather than
-+ // silently produce poorly performing binary.
-+ crashAfterMS = INT32_MAX;
-+
- UniquePtr<Options> options(new Options());
- // crashAfterTicks is guaranteed to be > 0 as
- // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
-diff -up firefox-84.0/security/sandbox/linux/moz.build.1516803
firefox-84.0/security/sandbox/linux/moz.build
---- firefox-84.0/security/sandbox/linux/moz.build.1516803 2020-12-10
16:17:55.425139545 +0100
-+++ firefox-84.0/security/sandbox/linux/moz.build 2020-12-10
16:29:21.945860841 +0100
-@@ -114,9 +114,8 @@ 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':
-+ LDFLAGS += ['--param', 'lto-partitions=1']
-
- DEFINES["NS_NO_XPCOM"] = True
- DisableStlWrapping()
-
diff --git a/http/firefox/patches/0015-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0015-bgo-748849-RUST_TARGET_override.patch
deleted file mode 100644
index f109538..0000000
--- a/http/firefox/patches/0015-bgo-748849-RUST_TARGET_override.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Sam James <sam AT gentoo.org>
-Subject: Allow RUST_TARGET override for detected Rust triplet (fixes musl
build)
-
-Respect RUST_TARGET from the environment to override Mozilla's
-own triplet detection.
-
-If the variable is unset, the old logic is used.
-
-The issue is that Gentoo supports both, say:
-- x86_64-unknown-linux-musl, and
-- x86-64-gentoo-linux-musl
-
-Our Rust is built to understand
--gentoo- as a vendor target, but
-our Rust only actually includes
--unknown-.
-
-Mozilla's configure sees -gentoo-
-in CHOST and that Rust _understands_
--gentoo- and tries to use it, without
-verifying that we actually have
--gentoo- installed as a Rust target.
-
-This requires exporting RUST_TARGET
-in the ebuild, possibly like:
-````
-inherit rust-toolchain
-
-src_configure() {
- [...]
- export RUST_TARGET=$(rust_abi)
- [...]
-}
-````
-
-Inspired by Alpine's patch at
-https://git.alpinelinux.org/aports/tree/community/firefox/fix-rust-target.patch?id=740922900cf8042be6751fcfcccdd3fc11bd77d3.
-
-Bug: https://bugs.gentoo.org/748849
-Bug: https://bugs.gentoo.org/779178
-Bug: https://bugs.gentoo.org/836226
-Thanks-to: Georgy Yakovlev <gyakovlev AT gentoo.org>
---- a/build/moz.configure/rust.configure
-+++ b/build/moz.configure/rust.configure
-@@ -275,6 +275,7 @@ def rust_supported_targets(rustc):
- return data
-
-
-+@imports('os')
- def detect_rustc_target(
- host_or_target, compiler_info, arm_target, rust_supported_targets
- ):
-@@ -396,7 +397,7 @@ def detect_rustc_target(
-
- return None
-
-- rustc_target = find_candidate(candidates)
-+ rustc_target = os.environ.get('RUST_TARGET', find_candidate(candidates))
-
- if rustc_target is None:
- die("Don't know how to translate {} for
rustc".format(host_or_target.alias))
diff --git a/http/firefox/patches/0015-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0015-bmo-1874059-fix-libcxx-18.patch
new file mode 100644
index 0000000..b21a93c
--- /dev/null
+++ b/http/firefox/patches/0015-bmo-1874059-fix-libcxx-18.patch
@@ -0,0 +1,16 @@
+--- a/build/moz.configure/toolchain.configure 2024-03-16 22:53:15.409390707
+0000
++++ b/build/moz.configure/toolchain.configure 2024-03-16 22:57:02.661805132
+0000
+@@ -2183,10 +2183,10 @@
+ set_define("_LIBCPP_HIDE_FROM_ABI",
libcxx_override_visibility.hide_from_abi)
+
+
+-@depends(target, build_environment)
+-def visibility_flags(target, env):
++@depends(target, build_environment, c_compiler)
++def visibility_flags(target, env, c_compiler):
+ if target.os != "WINNT":
+- if target.kernel == "Darwin":
++ if target.kernel == "Darwin" or (c_compiler.type == "clang" and
c_compiler.version >= "17.0.0"):
+ return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
+ return (
+ "-I%s/system_wrappers" % os.path.join(env.dist),
\ No newline at end of file
diff --git a/http/firefox/patches/0016-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0016-bmo-1874059-fix-libcxx-18.patch
deleted file mode 100644
index b21a93c..0000000
--- a/http/firefox/patches/0016-bmo-1874059-fix-libcxx-18.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/build/moz.configure/toolchain.configure 2024-03-16 22:53:15.409390707
+0000
-+++ b/build/moz.configure/toolchain.configure 2024-03-16 22:57:02.661805132
+0000
-@@ -2183,10 +2183,10 @@
- set_define("_LIBCPP_HIDE_FROM_ABI",
libcxx_override_visibility.hide_from_abi)
-
-
--@depends(target, build_environment)
--def visibility_flags(target, env):
-+@depends(target, build_environment, c_compiler)
-+def visibility_flags(target, env, c_compiler):
- if target.os != "WINNT":
-- if target.kernel == "Darwin":
-+ if target.kernel == "Darwin" or (c_compiler.type == "clang" and
c_compiler.version >= "17.0.0"):
- return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
- return (
- "-I%s/system_wrappers" % os.path.join(env.dist),
\ No newline at end of file
diff --git a/http/firefox/patches/0016-dont-use-build-id.patch
b/http/firefox/patches/0016-dont-use-build-id.patch
new file mode 100644
index 0000000..4ec8ac1
--- /dev/null
+++ b/http/firefox/patches/0016-dont-use-build-id.patch
@@ -0,0 +1,13 @@
+diff '--color=auto' -Naur a/build/moz.configure/flags.configure
b/build/moz.configure/flags.configure
+--- a/build/moz.configure/flags.configure 2024-07-08 20:04:44.944708403
+0300
++++ b/build/moz.configure/flags.configure 2024-07-08 20:13:30.867064722
+0300
+@@ -197,9 +197,6 @@
+
+ check_and_add_flag("-pipe", when=building_with_gcc)
+
+-check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
+-check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
+-
+ check_and_add_asm_flag("-Wa,--noexecstack",
when=building_with_gnu_compatible_cc)
+ check_and_add_linker_flag("-Wl,-z,noexecstack",
when=building_with_gnu_compatible_cc)
+ check_and_add_linker_flag("-Wl,-z,text",
when=building_with_gnu_compatible_cc)
diff --git a/http/firefox/patches/0017-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0017-bgo-929967-fix-pgo-on-musl.patch
new file mode 100644
index 0000000..3c8457e
--- /dev/null
+++ b/http/firefox/patches/0017-bgo-929967-fix-pgo-on-musl.patch
@@ -0,0 +1,14 @@
+diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
+index 7354714..0385792 100755
+--- a/build/pgo/profileserver.py
++++ b/build/pgo/profileserver.py
+@@ -171,6 +171,9 @@ if __name__ == "__main__":
+ env["UPLOAD_PATH"], "profile-run-1.log"
+ )
+
++ # Workaround for https://bugs.gentoo.org/929967
++ env["LD_LIBRARY_PATH"] = os.path.join(os.getcwd(), "dist", "bin")
++
+ # Run Firefox a first time to initialize its profile
+ runner = FirefoxRunner(
+ profile=profile,
diff --git a/http/firefox/patches/0017-dont-use-build-id.patch
b/http/firefox/patches/0017-dont-use-build-id.patch
deleted file mode 100644
index 4ec8ac1..0000000
--- a/http/firefox/patches/0017-dont-use-build-id.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff '--color=auto' -Naur a/build/moz.configure/flags.configure
b/build/moz.configure/flags.configure
---- a/build/moz.configure/flags.configure 2024-07-08 20:04:44.944708403
+0300
-+++ b/build/moz.configure/flags.configure 2024-07-08 20:13:30.867064722
+0300
-@@ -197,9 +197,6 @@
-
- check_and_add_flag("-pipe", when=building_with_gcc)
-
--check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
--check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
--
- check_and_add_asm_flag("-Wa,--noexecstack",
when=building_with_gnu_compatible_cc)
- check_and_add_linker_flag("-Wl,-z,noexecstack",
when=building_with_gnu_compatible_cc)
- check_and_add_linker_flag("-Wl,-z,text",
when=building_with_gnu_compatible_cc)
diff --git a/http/firefox/patches/0018-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0018-bgo-929967-fix-pgo-on-musl.patch
deleted file mode 100644
index 3c8457e..0000000
--- a/http/firefox/patches/0018-bgo-929967-fix-pgo-on-musl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
-index 7354714..0385792 100755
---- a/build/pgo/profileserver.py
-+++ b/build/pgo/profileserver.py
-@@ -171,6 +171,9 @@ if __name__ == "__main__":
- env["UPLOAD_PATH"], "profile-run-1.log"
- )
-
-+ # Workaround for https://bugs.gentoo.org/929967
-+ env["LD_LIBRARY_PATH"] = os.path.join(os.getcwd(), "dist", "bin")
-+
- # Run Firefox a first time to initialize its profile
- runner = FirefoxRunner(
- profile=profile,
diff --git a/http/firefox/patches/0018-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0018-gcc-always-inline-from-fedora.patch
new file mode 100644
index 0000000..d7af60f
--- /dev/null
+++ b/http/firefox/patches/0018-gcc-always-inline-from-fedora.patch
@@ -0,0 +1,14 @@
+diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
+--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
+@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
+ }
+
+ #else
+-// GCC is slower when dealing with always_inline, especially in debug
builds.
+-// When using Clang, use always_inline more aggressively.
+-# if defined(__clang__) || defined(NDEBUG)
++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
+ # define ALWAYS_INLINE __attribute__((always_inline)) inline
+ # else
+ # define ALWAYS_INLINE inline
diff --git
a/http/firefox/patches/0019-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0019-bmo-1657849-musl-sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..87b6e66
--- /dev/null
+++
b/http/firefox/patches/0019-bmo-1657849-musl-sandbox-sched_setscheduler.patch
@@ -0,0 +1,57 @@
+diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1759,16 +1759,24 @@
+ return Allow();
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++#if defined(LIBC_GLIBC)
++ case __NR_sched_setscheduler:
++#endif
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
+
++#if !defined(LIBC_GLIBC)
++ // For pthread_create(3) on musl; bug 1657849.
++ case __NR_sched_setscheduler:
++ return Allow();
++#endif
++
+ // For clock(3) on older glibcs; bug 1304220.
+ case __NR_times:
+ return Allow();
+
+ // Bug 1372428
+@@ -1950,17 +1958,25 @@
+ case __NR_sched_getaffinity:
+ case __NR_sched_setaffinity:
+ case __NR_sched_getparam:
+ case __NR_sched_setparam:
+ case __NR_sched_getscheduler:
++#if defined(LIBC_GLIBC)
+ case __NR_sched_setscheduler:
++#endif
+ case __NR_sched_getattr:
+ case __NR_sched_setattr: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
+
++#if !defined(LIBC_GLIBC)
++ // For pthread_create(3) on musl; bug 1657849.
++ case __NR_sched_setscheduler:
++ return Allow();
++#endif
++
+ // The priority bounds are also used, sometimes (bug 1838675):
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
+ return Allow();
+
+
diff --git a/http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
deleted file mode 100644
index d7af60f..0000000
--- a/http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
---- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
-+++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
-@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
- }
-
- #else
--// GCC is slower when dealing with always_inline, especially in debug
builds.
--// When using Clang, use always_inline more aggressively.
--# if defined(__clang__) || defined(NDEBUG)
-+# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
- # define ALWAYS_INLINE __attribute__((always_inline)) inline
- # else
- # define ALWAYS_INLINE inline
diff --git a/http/firefox/patches/0020-bgo-940031-wasm-support.patch
b/http/firefox/patches/0020-bgo-940031-wasm-support.patch
new file mode 100644
index 0000000..a02f290
--- /dev/null
+++ b/http/firefox/patches/0020-bgo-940031-wasm-support.patch
@@ -0,0 +1,12 @@
+diff -up a/toolkit/moz.configure.wasi b/toolkit/moz.configure
+--- a/toolkit/moz.configure.wasi
++++ b/toolkit/moz.configure
+@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing
+ def wasi_sysroot_flags(wasi_sysroot):
+ if wasi_sysroot:
+ log.info("Using wasi sysroot in %s", wasi_sysroot)
+- return ["--sysroot=%s" % wasi_sysroot]
++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs",
"-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi",
"%%PORTAGE_WORKDIR%%/wasi-sdk-%%WASI_SDK_VER%%-%%WASI_ARCH%%-linux/lib/clang/%%WASI_SDK_LLVM_VER%%/lib/wasi/libclang_rt.builtins-wasm32.a"]
+ return []
+
+ set_config("WASI_SYSROOT", wasi_sysroot)
diff --git
a/http/firefox/patches/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
deleted file mode 100644
index 87b6e66..0000000
---
a/http/firefox/patches/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
---- a/security/sandbox/linux/SandboxFilter.cpp
-+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -1759,16 +1759,24 @@
- return Allow();
- case __NR_sched_get_priority_min:
- case __NR_sched_get_priority_max:
- return Allow();
- case __NR_sched_getparam:
-- case __NR_sched_getscheduler:
-- case __NR_sched_setscheduler: {
-+#if defined(LIBC_GLIBC)
-+ case __NR_sched_setscheduler:
-+#endif
-+ case __NR_sched_getscheduler: {
- Arg<pid_t> pid(0);
- return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
- }
-
-+#if !defined(LIBC_GLIBC)
-+ // For pthread_create(3) on musl; bug 1657849.
-+ case __NR_sched_setscheduler:
-+ return Allow();
-+#endif
-+
- // For clock(3) on older glibcs; bug 1304220.
- case __NR_times:
- return Allow();
-
- // Bug 1372428
-@@ -1950,17 +1958,25 @@
- case __NR_sched_getaffinity:
- case __NR_sched_setaffinity:
- case __NR_sched_getparam:
- case __NR_sched_setparam:
- case __NR_sched_getscheduler:
-+#if defined(LIBC_GLIBC)
- case __NR_sched_setscheduler:
-+#endif
- case __NR_sched_getattr:
- case __NR_sched_setattr: {
- Arg<pid_t> pid(0);
- return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
- }
-
-+#if !defined(LIBC_GLIBC)
-+ // For pthread_create(3) on musl; bug 1657849.
-+ case __NR_sched_setscheduler:
-+ return Allow();
-+#endif
-+
- // The priority bounds are also used, sometimes (bug 1838675):
- case __NR_sched_get_priority_min:
- case __NR_sched_get_priority_max:
- return Allow();
-
-
diff --git a/http/firefox/patches/0021-bgo-928126-enable-jxl.patch
b/http/firefox/patches/0021-bgo-928126-enable-jxl.patch
new file mode 100644
index 0000000..bc2f865
--- /dev/null
+++ b/http/firefox/patches/0021-bgo-928126-enable-jxl.patch
@@ -0,0 +1,21 @@
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+index c99b4d628c54..0b1b1614620a 100644
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -703,9 +703,10 @@ set_define("MOZ_AV1", av1)
+ option("--disable-jxl", help="Disable jxl image support")
+
+
+-@depends("--disable-jxl", milestone.is_nightly)
+-def jxl(value, is_nightly):
+- if is_nightly and value:
++@depends("--disable-jxl")
++def jxl(value):
++ enabled = bool(value)
++ if enabled:
+ return True
+
+
+--
+2.38.1
+
diff --git a/http/firefox/patches/0021-bgo-940031-wasm-support.patch
b/http/firefox/patches/0021-bgo-940031-wasm-support.patch
deleted file mode 100644
index a02f290..0000000
--- a/http/firefox/patches/0021-bgo-940031-wasm-support.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up a/toolkit/moz.configure.wasi b/toolkit/moz.configure
---- a/toolkit/moz.configure.wasi
-+++ b/toolkit/moz.configure
-@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing
- def wasi_sysroot_flags(wasi_sysroot):
- if wasi_sysroot:
- log.info("Using wasi sysroot in %s", wasi_sysroot)
-- return ["--sysroot=%s" % wasi_sysroot]
-+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs",
"-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi",
"%%PORTAGE_WORKDIR%%/wasi-sdk-%%WASI_SDK_VER%%-%%WASI_ARCH%%-linux/lib/clang/%%WASI_SDK_LLVM_VER%%/lib/wasi/libclang_rt.builtins-wasm32.a"]
- return []
-
- set_config("WASI_SYSROOT", wasi_sysroot)
diff --git a/http/firefox/patches/0022-bgo-928126-enable-jxl.patch
b/http/firefox/patches/0022-bgo-928126-enable-jxl.patch
deleted file mode 100644
index bc2f865..0000000
--- a/http/firefox/patches/0022-bgo-928126-enable-jxl.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index c99b4d628c54..0b1b1614620a 100644
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -703,9 +703,10 @@ set_define("MOZ_AV1", av1)
- option("--disable-jxl", help="Disable jxl image support")
-
-
--@depends("--disable-jxl", milestone.is_nightly)
--def jxl(value, is_nightly):
-- if is_nightly and value:
-+@depends("--disable-jxl")
-+def jxl(value):
-+ enabled = bool(value)
-+ if enabled:
- return True
-
-
---
-2.38.1
-
diff --git a/http/firefox/patches/0022-bmo-1953080-pipewire-includes.patch
b/http/firefox/patches/0022-bmo-1953080-pipewire-includes.patch
new file mode 100644
index 0000000..dc692c9
--- /dev/null
+++ b/http/firefox/patches/0022-bmo-1953080-pipewire-includes.patch
@@ -0,0 +1,12 @@
+diff '--color=auto' -Naur
a/third_party/libwebrtc/modules/portal/pipewire_utils.cc
b/third_party/libwebrtc/modules/portal/pipewire_utils.cc
+--- a/third_party/libwebrtc/modules/portal/pipewire_utils.cc 2025-05-26
17:15:04.490924345 +0300
++++ b/third_party/libwebrtc/modules/portal/pipewire_utils.cc 2025-05-27
13:08:54.776412637 +0300
+@@ -8,6 +8,8 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
++#include <math.h>
++
+ #include "modules/portal/pipewire_utils.h"
+
+ #include <pipewire/pipewire.h>
- [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (39d83bc179ba2da2b07ded251d596e7549efd056), Pavel Vinogradov, 05/30/2025
Archive powered by MHonArc 2.6.24.