Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,108 changes: 3,108 additions & 0 deletions SPECS/firefox/0001-Patch-glsl-optimizer-to-build-with-glibc-2.43.patch

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions SPECS/firefox/0002-add-GetSystemProxyDirect-to-libproxy-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From c4548a6d9281709b79d053cfae49b70d92eb41e2 Mon Sep 17 00:00:00 2001
From: Christoph Moench-Tegeder <cmt@burggraben.net>
Date: Mon, 18 May 2026 08:01:32 +0000
Subject: [PATCH] Bug 2040125 - add GetSystemProxyDirect() to libproxy path
r=valentin,necko-reviewers

In bmo #2028356 a "fast-path to skip proxy resolution[...]" was added,
but the required method GetSystemProxyDirect() was not added for
libproxy-enabled builds (all other cases - general Unix without
libproxy, OSX, Windows - got that function).

This makes a "--enable-libproxy" build (MOZ_ENABLE_LIBPROXY) fail at
startup, as the symbol for nsUnixSystemProxySettings::GetSystemProxyDirect()
does not resolve.

This adds GetSystemProxyDirect() to the MOZ_ENABLE_LIBPROXY case - it's
trivial, as we cannot know what libproxy will return for a specific URL,
thus the fast-path does not apply and we can just return "false".

Differential Revision: https://phabricator.services.mozilla.com/D300937
---
toolkit/system/unixproxy/nsLibProxySettings.cpp | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/toolkit/system/unixproxy/nsLibProxySettings.cpp b/toolkit/system/unixproxy/nsLibProxySettings.cpp
index 3de1b7ce9b8fc..8b063d446c1e3 100644
--- a/toolkit/system/unixproxy/nsLibProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsLibProxySettings.cpp
@@ -111,6 +111,13 @@ nsUnixSystemProxySettings::GetSystemWPADSetting(bool* aSystemWPADSetting) {
return NS_OK;
}

+// we do not know if libproxy would return DIRECT or PROXY
+NS_IMETHODIMP
+nsUnixSystemProxySettings::GetSystemProxyDirect(bool* aResult) {
+ *aResult = false;
+ return NS_OK;
+}
+
NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) {
return do_AddRef(new nsUnixSystemProxySettings()).downcast<nsISupports>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 1444cc51c0249652a4998b8ee4ea084983b4bfb6 Mon Sep 17 00:00:00 2001
From: misaka00251 <liuxin@iscas.ac.cn>
Date: Sun, 17 May 2026 11:32:17 +0800
Subject: [PATCH] riscv64: Use long tail jump for xptcall stubs

The riscv64 xptcall stubs currently jump to SharedStub with a plain
`j SharedStub`. This emits an R_RISCV_JAL relocation, whose range is
limited to +/- 1 MiB.

When linking large optimized libxul builds, especially with LTO enabled,
the generated StubN functions may be placed too far away from SharedStub.
This causes lld to fail with relocation errors such as:

relocation R_RISCV_JAL out of range: ... references SharedStub

Use `tail SharedStub` instead. This preserves the tail-call semantics of
the original jump while allowing the assembler/linker to generate a
relaxable long branch sequence when needed.

Signed-off-by: misaka00251 <liuxin@iscas.ac.cn>
---
xpcom/reflect/xptcall/md/unix/xptcstubs_riscv64.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_riscv64.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_riscv64.cpp
index 17c0789eff..3330b34e8d 100644
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_riscv64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_riscv64.cpp
@@ -139,7 +139,7 @@ extern "C" nsresult ATTRIBUTE_USED PrepareAndDispatch(nsXPTCStubBase* self,
".err \"stub number "#n" >= 1000 not yet supported\"\n" \
".endif \n\t" \
"li t0, "#n" \n\t" \
- "j SharedStub \n" \
+ "tail SharedStub \n" \
".if "#n" < 10\n\t" \
".size _ZN14nsXPTCStubBase5Stub"#n"Ev,.-_ZN14nsXPTCStubBase5Stub"#n"Ev\n\t" \
".elseif "#n" < 100\n\t" \
--
2.54.0

18 changes: 18 additions & 0 deletions SPECS/firefox/2001-riscv64-enable-gles-rendering.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Description: allow-riscv64-usegles
Author: Han Gao <rabenda.cn@gmail.com>

Last-Update: 2024-06-20

Index: firefox-140.0.4/toolkit/xre/glxtest/glxtest.cpp
===================================================================
--- firefox-140.0.4.orig/toolkit/xre/glxtest/glxtest.cpp
+++ firefox-140.0.4/toolkit/xre/glxtest/glxtest.cpp
@@ -438,7 +438,7 @@ static bool get_egl_gl_status(EGLDisplay
PFNGLGETSTRING glGetString =
cast<PFNGLGETSTRING>(eglGetProcAddress("glGetString"));

-#if defined(__arm__) || defined(__aarch64__)
+#if defined(__arm__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
bool useGles = true;
#else
bool useGles = false;
40 changes: 40 additions & 0 deletions SPECS/firefox/2002-riscv64-libyuv-add-RVV-sources-to-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Wed, 21 May 2026 00:00:00 +0800
Subject: [PATCH] riscv64: libyuv: add row_rvv.cc / scale_rvv.cc to gypi

Without these, linking libxul on riscv64 with -march including the V
extension fails with undefined references to *Row_RVV symbols, e.g.

ld.lld: error: undefined hidden symbol: J400ToARGBRow_RVV
>>> referenced by yuv_convert.cpp:333

Both files are self-guarded with __riscv_vector, so listing them
unconditionally alongside the LoongArch lsx/lasx entries is safe for
other architectures.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
media/libyuv/libyuv/libyuv.gypi | 2 ++
1 file changed, 2 insertions(+)

diff --git a/media/libyuv/libyuv/libyuv.gypi b/media/libyuv/libyuv/libyuv.gypi
--- a/media/libyuv/libyuv/libyuv.gypi
+++ b/media/libyuv/libyuv/libyuv.gypi
@@ -86,6 +86,7 @@
'source/row_gcc.cc',
'source/row_lasx.cc',
'source/row_lsx.cc',
+ 'source/row_rvv.cc',
'source/row_win.cc',
'source/scale.cc',
'source/scale_any.cc',
@@ -94,6 +95,7 @@
'source/scale_gcc.cc',
'source/scale_lsx.cc',
'source/scale_rgb.cc',
+ 'source/scale_rvv.cc',
'source/scale_uv.cc',
'source/scale_win.cc',
'source/video_common.cc',
--
2.47.0
9 changes: 9 additions & 0 deletions SPECS/firefox/distribution.ini.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Global]
id=__ID__
version=1.0
about=Mozilla Firefox for __NAME__

[Preferences]
app.distributor=__ID__
app.distributor.channel=__ID__
app.partner.openruyi=__ID__
Loading
Loading