Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (c8808dd99b4f33968dd0227f6e5fed3987607b26)
  • Date: Mon, 3 Mar 2025 19:02:25 +0000

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

http/firefox/DEPENDS
| 2
http/firefox/DETAILS
| 4
http/firefox/HISTORY
| 5

http/firefox/patches/0013-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 +
http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
| 19 -

http/firefox/patches/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 -
http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
| 167 ++++++++++
http/firefox/patches/0015-bgo-748849-RUST_TARGET_override.patch
| 61 +++
http/firefox/patches/0015-gcc-lto-pgo-gentoo.patch
| 167 ----------
http/firefox/patches/0016-bgo-748849-RUST_TARGET_override.patch
| 61 ---
http/firefox/patches/0016-bmo-1874059-fix-libcxx-18.patch
| 16
http/firefox/patches/0017-bmo-1874059-fix-libcxx-18.patch
| 16
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-dont-use-build-id.patch
| 13

http/firefox/patches/0019-bgo-925101-force-software-rendering-during-pgo-build.patch
| 16
http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
| 14
http/firefox/patches/0020-bgo-929967-fix-pgo-on-musl.patch
| 14
http/firefox/patches/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 57 +++
http/firefox/patches/0021-bgo-940031-wasm-support.patch
| 12
http/firefox/patches/0021-gcc-always-inline-from-fedora.patch
| 14
http/firefox/patches/0022-bgo-944056-fix-wasm-on-llvm-profile.patch
| 13
http/firefox/patches/0022-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 57 ---
http/firefox/patches/0023-bgo-940031-wasm-support.patch
| 12

http/firefox/patches/0023-bmo-1790526-check-for-propagated-BrowsingContext-in-SessionStoreParent.patch
| 30 +
http/firefox/patches/0024-bgo-944056-fix-wasm-on-llvm-profile.patch
| 13
http/firefox/patches/0025-bmo-1559213-support-system-av1-and-libvpx.patch
| 96 -----
27 files changed, 425 insertions(+), 521 deletions(-)

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

http/firefox: version 136.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index 8945c3b..6382964 100755
--- a/http/firefox/DEPENDS
+++ b/http/firefox/DEPENDS
@@ -51,7 +51,7 @@ depends libwebp "--with-system-webp"
&&

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

-local NSS_BRANCH="3.107" &&
+local NSS_BRANCH="3.108" &&
if spell_ok nss &&
is_version_less "$(installed_version nss)" "${NSS_BRANCH}"; then
depends -sub "${NSS_BRANCH}" nss "--with-system-nss"
diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index be37162..791cfe1 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=135.0.1
- SECURITY_PATCH=204
+ VERSION=136.0
+ SECURITY_PATCH=205
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 2812e9f..3e69463 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2025-03-03 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 136.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.108
+ * patches/*: updated
+
2025-02-18 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 135.0.1, SECURITY_PATCH++

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
new file mode 100644
index 0000000..bb0621a
--- /dev/null
+++
b/http/firefox/patches/0013-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/0013-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
deleted file mode 100644
index 112cd42..0000000
--- a/http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi
firefox-115.0/widget/gtk/GfxInfo.cpp
---- firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-06-29
12:18:53.179833765 +0200
-+++ firefox-115.0/widget/gtk/GfxInfo.cpp 2023-06-29 12:19:33.256212776
+0200
-@@ -970,14 +970,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
- nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
- V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", "");
-
-- // Disable on Release/late Beta on AMD
--#if !defined(EARLY_BETA_OR_EARLIER)
-- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::AtiAll,
-- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
-- nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
-- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
-- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE",
"");
--#endif
- ////////////////////////////////////
- // FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST
- APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All,
-
diff --git
a/http/firefox/patches/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch

b/http/firefox/patches/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0014-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/0014-gcc-lto-pgo-gentoo.patch
b/http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
new file mode 100644
index 0000000..e4608fe
--- /dev/null
+++ b/http/firefox/patches/0014-gcc-lto-pgo-gentoo.patch
@@ -0,0 +1,167 @@
+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 -r ac0e1ee8218f build/pgo/profileserver.py
+--- a/build/pgo/profileserver.py Tue Feb 20 13:51:00 2024 +0000
++++ b/build/pgo/profileserver.py Sat Feb 24 22:47:17 2024 -0800
+@@ -93,19 +93,32 @@
+ ),
+ path_mappings=path_mappings,
+ )
+ sp3_httpd.start(block=False)
+ print("started SP3 server on port 8000")
+ 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
+ profile_data_dir = os.path.join(build.topsrcdir, "testing",
"profiles")
+ with open(os.path.join(profile_data_dir, "profiles.json"), "r") as
fh:
+ base_profiles = json.load(fh)["profileserver"]
+
+ prefpaths = [
+@@ -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
new file mode 100644
index 0000000..f109538
--- /dev/null
+++ b/http/firefox/patches/0015-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/0015-gcc-lto-pgo-gentoo.patch
b/http/firefox/patches/0015-gcc-lto-pgo-gentoo.patch
deleted file mode 100644
index e4608fe..0000000
--- a/http/firefox/patches/0015-gcc-lto-pgo-gentoo.patch
+++ /dev/null
@@ -1,167 +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 -r ac0e1ee8218f build/pgo/profileserver.py
---- a/build/pgo/profileserver.py Tue Feb 20 13:51:00 2024 +0000
-+++ b/build/pgo/profileserver.py Sat Feb 24 22:47:17 2024 -0800
-@@ -93,19 +93,32 @@
- ),
- path_mappings=path_mappings,
- )
- sp3_httpd.start(block=False)
- print("started SP3 server on port 8000")
- 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
- profile_data_dir = os.path.join(build.topsrcdir, "testing",
"profiles")
- with open(os.path.join(profile_data_dir, "profiles.json"), "r") as
fh:
- base_profiles = json.load(fh)["profileserver"]
-
- prefpaths = [
-@@ -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/0016-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0016-bgo-748849-RUST_TARGET_override.patch
deleted file mode 100644
index f109538..0000000
--- a/http/firefox/patches/0016-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/0016-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0016-bmo-1874059-fix-libcxx-18.patch
new file mode 100644
index 0000000..b21a93c
--- /dev/null
+++ b/http/firefox/patches/0016-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/0017-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0017-bmo-1874059-fix-libcxx-18.patch
deleted file mode 100644
index b21a93c..0000000
--- a/http/firefox/patches/0017-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/0017-dont-use-build-id.patch
b/http/firefox/patches/0017-dont-use-build-id.patch
new file mode 100644
index 0000000..4ec8ac1
--- /dev/null
+++ b/http/firefox/patches/0017-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/0018-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0018-bgo-929967-fix-pgo-on-musl.patch
new file mode 100644
index 0000000..3c8457e
--- /dev/null
+++ b/http/firefox/patches/0018-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/0018-dont-use-build-id.patch
b/http/firefox/patches/0018-dont-use-build-id.patch
deleted file mode 100644
index 4ec8ac1..0000000
--- a/http/firefox/patches/0018-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/0019-bgo-925101-force-software-rendering-during-pgo-build.patch

b/http/firefox/patches/0019-bgo-925101-force-software-rendering-during-pgo-build.patch
deleted file mode 100644
index 7f4b987..0000000
---
a/http/firefox/patches/0019-bgo-925101-force-software-rendering-during-pgo-build.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-bgo#925101 for some unknown reason some users are having issues with pgo
crashing. Forcing software
-rendering to be used while pgo'ing doesn't have an impact in performance, as
hwaccel isn't used
-during pgo even when it works. The issue could be caused by
wrongly/automatically
-configured/detected gpu access anyway. The issue seems related to mesa, but
hard to pinpoint.
-
-diff '--color=auto' -Naur a/testing/profiles/profileserver/user.js
b/testing/profiles/profileserver/user.js
---- a/testing/profiles/profileserver/user.js 2024-07-11 10:37:53.889115118
+0300
-+++ b/testing/profiles/profileserver/user.js 2024-07-11 10:40:23.086996283
+0300
-@@ -11,3 +11,6 @@
- user_pref("extensions.webextensions.warnings-as-errors", false);
- // Turn off update
- user_pref("app.update.disabledForTesting", true);
-+// bgo#925101 mesa issues with pgo, force software rendering during pgo
-+user_pref("gfx.webrender.software", true);
-+
diff --git a/http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0019-gcc-always-inline-from-fedora.patch
new file mode 100644
index 0000000..d7af60f
--- /dev/null
+++ b/http/firefox/patches/0019-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/0020-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0020-bgo-929967-fix-pgo-on-musl.patch
deleted file mode 100644
index 3c8457e..0000000
--- a/http/firefox/patches/0020-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/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0020-bmo-1657849-musl-sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..87b6e66
--- /dev/null
+++
b/http/firefox/patches/0020-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/0021-bgo-940031-wasm-support.patch
b/http/firefox/patches/0021-bgo-940031-wasm-support.patch
new file mode 100644
index 0000000..a02f290
--- /dev/null
+++ b/http/firefox/patches/0021-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/0021-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0021-gcc-always-inline-from-fedora.patch
deleted file mode 100644
index d7af60f..0000000
--- a/http/firefox/patches/0021-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/0022-bgo-944056-fix-wasm-on-llvm-profile.patch
b/http/firefox/patches/0022-bgo-944056-fix-wasm-on-llvm-profile.patch
new file mode 100644
index 0000000..e9b6bfa
--- /dev/null
+++ b/http/firefox/patches/0022-bgo-944056-fix-wasm-on-llvm-profile.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/944056
+
+--- a/gfx/graphite2/src/MozGrMalloc.h
++++ b/gfx/graphite2/src/MozGrMalloc.h
+@@ -12,7 +12,7 @@
+
+ #include "mozilla/mozalloc.h"
+
+-#if defined(XP_LINUX) && !defined(ANDROID)
++#if defined(XP_LINUX) && !defined(_LIBCPP_VERSION)
+
+ #define malloc moz_xmalloc
+ #define calloc moz_xcalloc
diff --git
a/http/firefox/patches/0022-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0022-bmo-1657849-musl-sandbox-sched_setscheduler.patch
deleted file mode 100644
index 87b6e66..0000000
---
a/http/firefox/patches/0022-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/0023-bgo-940031-wasm-support.patch
b/http/firefox/patches/0023-bgo-940031-wasm-support.patch
deleted file mode 100644
index a02f290..0000000
--- a/http/firefox/patches/0023-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/0023-bmo-1790526-check-for-propagated-BrowsingContext-in-SessionStoreParent.patch

b/http/firefox/patches/0023-bmo-1790526-check-for-propagated-BrowsingContext-in-SessionStoreParent.patch
new file mode 100644
index 0000000..eeafc55
--- /dev/null
+++
b/http/firefox/patches/0023-bmo-1790526-check-for-propagated-BrowsingContext-in-SessionStoreParent.patch
@@ -0,0 +1,30 @@
+diff --git a/toolkit/components/sessionstore/SessionStoreParent.cpp
b/toolkit/components/sessionstore/SessionStoreParent.cpp
+--- a/toolkit/components/sessionstore/SessionStoreParent.cpp
++++ b/toolkit/components/sessionstore/SessionStoreParent.cpp
+@@ -196,11 +196,11 @@
+
+ mozilla::ipc::IPCResult
SessionStoreParent::RecvIncrementalSessionStoreUpdate(
+ const MaybeDiscarded<BrowsingContext>& aBrowsingContext,
+ const Maybe<FormData>& aFormData, const Maybe<nsPoint>& aScrollPosition,
+ uint32_t aEpoch) {
+- if (!aBrowsingContext.IsNull()) {
++ if (!aBrowsingContext.IsNullOrDiscarded()) {
+ if (aFormData.isSome()) {
+ mHasNewFormData = true;
+ }
+ if (aScrollPosition.isSome()) {
+ mHasNewScrollPosition = true;
+@@ -214,11 +214,11 @@
+ return IPC_OK();
+ }
+
+ mozilla::ipc::IPCResult SessionStoreParent::RecvResetSessionStore(
+ const MaybeDiscarded<BrowsingContext>& aBrowsingContext, uint32_t
aEpoch) {
+- if (!aBrowsingContext.IsNull()) {
++ if (!aBrowsingContext.IsNullOrDiscarded()) {
+ mSessionStore->RemoveSessionStore(
+ aBrowsingContext.GetMaybeDiscarded()->Canonical());
+ }
+ return IPC_OK();
+ }
+
diff --git
a/http/firefox/patches/0024-bgo-944056-fix-wasm-on-llvm-profile.patch
b/http/firefox/patches/0024-bgo-944056-fix-wasm-on-llvm-profile.patch
deleted file mode 100644
index e9b6bfa..0000000
--- a/http/firefox/patches/0024-bgo-944056-fix-wasm-on-llvm-profile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/944056
-
---- a/gfx/graphite2/src/MozGrMalloc.h
-+++ b/gfx/graphite2/src/MozGrMalloc.h
-@@ -12,7 +12,7 @@
-
- #include "mozilla/mozalloc.h"
-
--#if defined(XP_LINUX) && !defined(ANDROID)
-+#if defined(XP_LINUX) && !defined(_LIBCPP_VERSION)
-
- #define malloc moz_xmalloc
- #define calloc moz_xcalloc
diff --git
a/http/firefox/patches/0025-bmo-1559213-support-system-av1-and-libvpx.patch
b/http/firefox/patches/0025-bmo-1559213-support-system-av1-and-libvpx.patch
deleted file mode 100644
index 240ef56..0000000
---
a/http/firefox/patches/0025-bmo-1559213-support-system-av1-and-libvpx.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff --git a/config/external/moz.build b/config/external/moz.build
-index 2fc8df57992e..63d18e50a961 100644
---- a/config/external/moz.build
-+++ b/config/external/moz.build
-@@ -40,8 +40,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/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
-index 5c6e25b3980b..ce99ebfb6d3f 100644
---- a/dom/media/platforms/moz.build
-+++ b/dom/media/platforms/moz.build
-@@ -81,6 +81,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/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
-index 761fc8cf4cd9..793a5b8697a8 100644
---- a/media/ffvpx/libavcodec/moz.build
-+++ b/media/ffvpx/libavcodec/moz.build
-@@ -120,10 +120,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
- 'vp9recon.c',
- 'vpx_rac.c',
- ]
-- USE_LIBS += [
-- 'dav1d',
-- 'media_libdav1d_asm',
-- ]
-+ if CONFIG["MOZ_SYSTEM_AV1"]:
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+ else:
-+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
-+ ]
- if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
- LOCAL_INCLUDES += ['/media/mozva']
- SOURCES += [
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index f93a5d64fec8..814357f4e979 100644
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -744,7 +744,23 @@ def av1(value):
- return True
-
-
--@depends(target, when=av1 & compile_environment)
-+option("--with-system-av1",
-+ help="Use system av1 (located with pkgconfig)")
-+
-+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
-@@ -760,6 +776,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
- # ==============================================================
-
-


  • [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (c8808dd99b4f33968dd0227f6e5fed3987607b26), Pavel Vinogradov, 03/03/2025

Archive powered by MHonArc 2.6.24.

Top of Page