Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/firefox
diff options
context:
space:
mode:
Diffstat (limited to 'extra/firefox')
-rw-r--r--extra/firefox/PKGBUILD90
-rw-r--r--extra/firefox/avoid-libxul-OOM-python-check.patch22
-rw-r--r--extra/firefox/firefox-111.0.1-fdlibm.patch21
-rw-r--r--extra/firefox/fix-i686-build-moz-1792159.patch18
-rw-r--r--extra/firefox/fix-i686-xsimd-incomplete.patch29
-rw-r--r--extra/firefox/mozconfig-i686.patch35
-rw-r--r--extra/firefox/mozconfig-pentium4.patch30
-rw-r--r--extra/firefox/rust-static-disable-network-test-on-static-libraries.patch13
8 files changed, 207 insertions, 51 deletions
diff --git a/extra/firefox/PKGBUILD b/extra/firefox/PKGBUILD
index cd32ea26..172abdf7 100644
--- a/extra/firefox/PKGBUILD
+++ b/extra/firefox/PKGBUILD
@@ -1,10 +1,11 @@
# disable LTO as it has little benefit and uses too many resources
# don't compile with clang, use gcc toolchain (clang has issues on IA32)
-# disable SIMD (SSE20 for i686
+# disable SIMD (SSE2 for i686)
# set correct compiler and toochain tools
if [ "${CARCH}" = "pentium4" ]; then
source+=('mozconfig-pentium4.patch')
- sha256sums+=('dd49547b516936fe372f6f63c94e62dd975021ad97bcf31e98551ecff9890aed')
+ sha256sums+=('c8b5376c4ee3f7dec4c9fe2b81434df4e2f5dd7caa99c8bf4371aec3c32233af')
+ b2sums+=('6d1f48b81a430ca39e8ea8de6ffc44010c18344b0f3b1d282f7f6d6e124823f2152267c593c1d86f049a0d8a80591b20e27b3e7c2ca29f6b29b68ef4333e4828')
eval "$(
declare -f prepare | \
sed '
@@ -14,7 +15,8 @@ eval "$(
fi
if [ "${CARCH}" = "i686" ]; then
source+=('mozconfig-i686.patch')
- sha256sums+=('dd49547b516936fe372f6f63c94e62dd975021ad97bcf31e98551ecff9890aed')
+ sha256sums+=('a0e274593c8d3587c4a669e22c480997cce24789f1dff78fb0da0f1d43083d68')
+ b2sums+=('7f6a89042ab4a4c7c6727056029d0e20411fa63c6b857a0a75c95c0544e81bea565d8cb0daba0c775861d45486ca9ab5375ec564ed567bd330f72a5e1d657ea3')
eval "$(
declare -f prepare | \
sed '
@@ -22,11 +24,13 @@ eval "$(
'
)"
fi
+
+# try hard to tell ld and rust not to use too much memory (no lto, no debug info, etc.)
eval "$(
declare -f build | \
sed '
2 a export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off"
- 2 a export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+ 2 a export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,--max-cache-size=16384000 "
'
declare -f prepare | \
sed '
@@ -118,14 +122,19 @@ eval "$(
eval "$(
declare -f build | \
sed '
- 2 a export MOZ_MAKE_FLAGS=-j1
+ 2 a export MOZ_MAKE_FLAGS=-j2
+ '
+ declare -f package | \
+ sed '
+ 2 a export MOZ_MAKE_FLAGS=-j2
'
)"
# test failure in rust code (complaining about network functions) when PGO is used,
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1565757
source+=('rust-static-disable-network-test-on-static-libraries.patch')
-sha256sums+=('cff239cbeca6fb6171ed4849b6b42173ce6b4fd2f671e1d5dedd1d81795f3da8')
+sha256sums+=('10c5276eab2e87f400a6ec15d7ffbef3b0407ee888dea36f1128927ca55b9041')
+b2sums+=('009789d3bb93ba418929019135804fc3de7de161e5be8efba7fc75646fbde395720be5b7a7d3f5d1671f459fdd2944dd14aca306bbf1c975436d4f7765d62d15')
eval "$(
declare -f prepare | \
sed '
@@ -145,7 +154,8 @@ eval "$(
# readelf: Error: Unable to seek to 0x801db328 for section headers
source+=('avoid-libxul-OOM-python-check.patch')
-sha256sums+=('bf2829f280ef05a608584ce7ec95875e147f315bac9609f5e18052bc03e3c4f9')
+sha256sums+=('2f0c81a38c4578f68f5456b618fe84a78974072821488173eb55e0e72287e353')
+b2sums+=('97035e44cd1deae7bb2422c81eec7294feb51f43f460b4d7ddba083e1d8a48d265a36ca43cf1d9dee49b01ee6df0c76e0f6916cc73cb7ad9caa1c235a59da0e4')
eval "$(
declare -f prepare | \
sed '
@@ -183,3 +193,69 @@ if [ "${CARCH}" = "i686" ]; then
CFLAGS="$CFLAGS -mmmx"
CXXFLAGS="$CXXFLAGS -mmmx"
fi
+
+# do not build and phone back symbols, fails anyway with:
+# "panic occurred at library/alloc/src/raw_vec.rs:537: capacity overflow\n" in
+# dump_syms (see also FS32#174)
+eval "$(
+ declare -f build | \
+ sed '
+ /echo.*symbol archive/,/mach buildsymbols/{s/\(.*\)/#\1/g}
+ '
+)"
+
+eval "$(
+ declare -f package | \
+ sed '
+ /export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE/,/fi/{s/\(.*\)/#\1/g}
+ '
+)"
+
+# 214:49.30 /build/firefox/src/firefox-99.0.1/modules/fdlibm/src/math_private.h:34:21: error: conflicting
+# declaration ?typedef __double_t double_t?
+# and
+# typedef __float_t float_t;
+# /usr/include/math.h:169:21: note: previous declaration as ?typedef long double float_t?
+# typedef long double float_t;
+source+=('firefox-111.0.1-fdlibm.patch')
+sha256sums+=('ed3bb281697af7c4353a34067ffb4b18a971d40757bef2d6af3c8bf2d28d42d1')
+b2sums+=('05c7c9727201971650df4ca2e00539767fc9e159539835c641fccab5ec9577a7294e8f62f5d0670158316e5467ea121c03a36fd4ba153e1d60f3402f0430548d')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -p1 -i "$srcdir/firefox-111.0.1-fdlibm.patch"
+ '
+)"
+
+# disable stripping in mozconfig.<arch> (insists to use llvm-strip which runs
+# out of memory on libxul.so). Now 2.5 GB can be stripped to 166 MB, so we do
+# that with the normal 'strip' from binutils after 'mach install'
+eval "$(
+ declare -f package | \
+ sed '
+ /.*mach.*install/ a \
+ strip "$pkgdir/usr/lib/$pkgname/libxul.so"
+ '
+)"
+
+# from Voidlinux, enable atomics in JIT for i686
+source+=('fix-i686-build-moz-1792159.patch')
+sha256sums+=('2fb39374fd3d80eea9e346032a2a4b2bc2e357dee7380855b24bcf19b1335d06')
+b2sums+=('d20ce3eff595f85df86eaa0dfb665fc356f8987117a771f76adc4ac12046a7e82b0af182fa99f87ea1362a5026c9d0216c7b714649fef0c7294c61c8e8f4d790')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -p1 -i "$srcdir/fix-i686-build-moz-1792159.patch"
+ '
+)"
+
+# from Parabola (thanks go to bill-auger)
+source+=('fix-i686-xsimd-incomplete.patch')
+sha256sums+=('c3ce181fbb0142055aa6dd17f3cda2ba6a1e54d7a689a8c6e9cce76aa40e6544')
+b2sums+=('3e6fd4cebe0fd4c250ccf5b04e12b93e5f4cc2d139301316c987cc07a57b4b6b49b830d745520a82f5ac59da8d17f728a3ecce4dccf21804a2d6a256a6f76472')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -p1 -i "$srcdir/fix-i686-xsimd-incomplete.patch"
+ '
+)"
diff --git a/extra/firefox/avoid-libxul-OOM-python-check.patch b/extra/firefox/avoid-libxul-OOM-python-check.patch
index 04ce4958..63228113 100644
--- a/extra/firefox/avoid-libxul-OOM-python-check.patch
+++ b/extra/firefox/avoid-libxul-OOM-python-check.patch
@@ -1,30 +1,30 @@
-diff -rauN firefox-79.0/config/rules.mk firefox-79.0-avoid-libxul-OOM-python-check-patch/config/rules.mk
---- firefox-79.0/config/rules.mk 2020-07-21 00:49:36.000000000 +0200
-+++ firefox-79.0-avoid-libxul-OOM-python-check-patch/config/rules.mk 2020-08-02 14:04:30.846204786 +0200
+diff -rauN a/config/rules.mk b/config/rules.mk
+--- a/config/rules.mk 2020-10-13 20:28:50.994026769 +0200
++++ b/config/rules.mk 2020-10-13 20:29:06.594023940 +0200
@@ -470,7 +470,7 @@
- endif # MSVC with manifest tool
+ $(LINKER) -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
else # !WINNT || GNU_CC
- $(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+ $(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
- $(call py_action,check_binary,--target $@)
+# $(call py_action,check_binary,--target $@)
endif # WINNT && !GNU_CC
ifdef ENABLE_STRIP
-@@ -526,7 +526,7 @@
- endif # MSVC with manifest tool
+@@ -514,7 +514,7 @@
+ $(LINKER) -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
else
- $(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+ $(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
- $(call py_action,check_binary,--target $@)
+# $(call py_action,check_binary,--target $@)
endif # WINNT && !GNU_CC
ifdef ENABLE_STRIP
-@@ -606,7 +606,7 @@
+@@ -594,7 +594,7 @@
$(RM) $@
endif
- $(MKSHLIB) $($@_OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
+ $(MKSHLIB) $($@_OBJS) $(filter %.res,$^) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
- $(call py_action,check_binary,--target $@)
+# $(call py_action,check_binary,--target $@)
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- ifdef MSMANIFEST_TOOL
+ endif # WINNT && !GCC
diff --git a/extra/firefox/firefox-111.0.1-fdlibm.patch b/extra/firefox/firefox-111.0.1-fdlibm.patch
new file mode 100644
index 00000000..f2c15a2b
--- /dev/null
+++ b/extra/firefox/firefox-111.0.1-fdlibm.patch
@@ -0,0 +1,21 @@
+diff -rauN firefox-111.0.1/modules/fdlibm/src/math_private.h firefox-111.0.1-fdlibm-patch/modules/fdlibm/src/math_private.h
+--- firefox-111.0.1/modules/fdlibm/src/math_private.h 2023-03-21 14:16:09.000000000 +0100
++++ firefox-111.0.1-fdlibm-patch/modules/fdlibm/src/math_private.h 2023-04-08 16:50:07.828564320 +0200
+@@ -30,9 +30,17 @@
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
++#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
++typedef long double __double_t;
++#else
+ typedef double __double_t;
++#endif
+ typedef __double_t double_t;
++#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
++typedef long double __float_t;
++#else
+ typedef float __float_t;
++#endif
+
+ /*
+ * The original fdlibm code used statements like:
diff --git a/extra/firefox/fix-i686-build-moz-1792159.patch b/extra/firefox/fix-i686-build-moz-1792159.patch
new file mode 100644
index 00000000..592dcad9
--- /dev/null
+++ b/extra/firefox/fix-i686-build-moz-1792159.patch
@@ -0,0 +1,18 @@
+--- a/js/src/jit/shared/AtomicOperations-shared-jit.cpp
++++ b/js/src/jit/shared/AtomicOperations-shared-jit.cpp
+@@ -5,4 +5,9 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++// bug 1792159
++#if defined(__i386__) && defined(__GNUC__) && !defined(__clang__)
++# include "../../../mfbt/Attributes.h"
++#endif
++
+ #include "jit/AtomicOperations.h"
+
+--- a/config/check_spidermonkey_style.py
++++ b/config/check_spidermonkey_style.py
+@@ -68,2 +68,3 @@
+ "jit/AtomicOperationsGenerated.h", # generated in $OBJDIR
++ "../../../mfbt/Attributes.h", # unrecognized path
+ "jit/CacheIROpsGenerated.h", # generated in $OBJDIR
diff --git a/extra/firefox/fix-i686-xsimd-incomplete.patch b/extra/firefox/fix-i686-xsimd-incomplete.patch
new file mode 100644
index 00000000..c0df0054
--- /dev/null
+++ b/extra/firefox/fix-i686-xsimd-incomplete.patch
@@ -0,0 +1,29 @@
+diff --git a/dom/base/nsTextFragmentGeneric.h b/dom/base/nsTextFragmentGeneric.h
+index 10e16fcfaa..87d9e0d075 100644
+--- a/dom/base/nsTextFragmentGeneric.h
++++ b/dom/base/nsTextFragmentGeneric.h
+@@ -13,7 +13,6 @@ namespace mozilla {
+
+ template <class Arch>
+ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
+- const uint32_t numUnicharsPerVector = xsimd::batch<int16_t, Arch>::size;
+ using p = Non8BitParameters<sizeof(size_t)>;
+ const size_t mask = p::mask();
+ const uint32_t numUnicharsPerWord = p::numUnicharsPerWord();
+@@ -28,16 +27,6 @@ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
+ if (str[i] > 255) return i;
+ }
+
+- // Check one batch at a time.
+- const int32_t vectWalkEnd =
+- ((len - i) / numUnicharsPerVector) * numUnicharsPerVector;
+- const uint16_t shortMask = 0xff00;
+- xsimd::batch<int16_t, Arch> vectmask(static_cast<int16_t>(shortMask));
+- for (; i < vectWalkEnd; i += numUnicharsPerVector) {
+- const auto vect = xsimd::batch<int16_t, Arch>::load_aligned(str + i);
+- if (xsimd::any((vect & vectmask) != 0)) return i;
+- }
+-
+ // Check one word at a time.
+ const int32_t wordWalkEnd =
+ ((len - i) / numUnicharsPerWord) * numUnicharsPerWord;
diff --git a/extra/firefox/mozconfig-i686.patch b/extra/firefox/mozconfig-i686.patch
index 885c51af..f735ccb2 100644
--- a/extra/firefox/mozconfig-i686.patch
+++ b/extra/firefox/mozconfig-i686.patch
@@ -1,24 +1,29 @@
diff -rauN a/mozconfig b/mozconfig
---- a/mozconfig 2020-08-02 13:46:05.333926656 +0200
-+++ b/mozconfig 2020-08-02 14:17:41.724611141 +0200
-@@ -5,13 +5,14 @@
+--- a/mozconfig 2021-03-27 17:15:18.957711830 +0100
++++ b/mozconfig 2021-03-27 17:18:01.431035465 +0100
+@@ -5,8 +5,9 @@
+ ac_add_options --enable-release
ac_add_options --enable-hardening
ac_add_options --enable-optimize
- ac_add_options --enable-rust-simd
+-ac_add_options --enable-rust-simd
-ac_add_options --enable-linker=lld
++ac_add_options --disable-rust-simd
+ac_add_options --enable-linker=bfd
++ac_add_options --disable-webrtc
ac_add_options --disable-elf-hack
--export CC='clang --target=x86_64-unknown-linux-gnu'
--export CXX='clang++ --target=x86_64-unknown-linux-gnu'
--export AR=llvm-ar
--export NM=llvm-nm
--export RANLIB=llvm-ranlib
+
+ # Branding
+@@ -35,3 +35,11 @@
+ ac_add_options --enable-crashreporter
+ ac_add_options --disable-updater
+ ac_add_options --disable-tests
++
++# pentium4 specific options
+ac_add_options --disable-lto
++ac_add_options --disable-install-strip
+export CC=gcc
+export CXX=g++
-+export AR=gcc-ar
-+export NM=gcc-nm
-+export RANLIB=gcc-ranlib
-
- # Branding
- ac_add_options --enable-official-branding
++export AR=ar
++export NM=nm
++export RANLIB=ranlib
++export STRIP=strip
diff --git a/extra/firefox/mozconfig-pentium4.patch b/extra/firefox/mozconfig-pentium4.patch
index 885c51af..8b51064a 100644
--- a/extra/firefox/mozconfig-pentium4.patch
+++ b/extra/firefox/mozconfig-pentium4.patch
@@ -1,24 +1,26 @@
diff -rauN a/mozconfig b/mozconfig
---- a/mozconfig 2020-08-02 13:46:05.333926656 +0200
-+++ b/mozconfig 2020-08-02 14:17:41.724611141 +0200
-@@ -5,13 +5,14 @@
+--- a/mozconfig 2021-03-27 17:15:18.957711830 +0100
++++ b/mozconfig 2021-03-27 17:17:07.357711058 +0100
+@@ -6,7 +6,7 @@
ac_add_options --enable-hardening
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
-ac_add_options --enable-linker=lld
+ac_add_options --enable-linker=bfd
ac_add_options --disable-elf-hack
--export CC='clang --target=x86_64-unknown-linux-gnu'
--export CXX='clang++ --target=x86_64-unknown-linux-gnu'
--export AR=llvm-ar
--export NM=llvm-nm
--export RANLIB=llvm-ranlib
+
+ # Branding
+@@ -35,3 +35,11 @@
+ ac_add_options --enable-crashreporter
+ ac_add_options --disable-updater
+ ac_add_options --disable-tests
++
++# pentium4 specific options
+ac_add_options --disable-lto
++ac_add_options --disable-install-strip
+export CC=gcc
+export CXX=g++
-+export AR=gcc-ar
-+export NM=gcc-nm
-+export RANLIB=gcc-ranlib
-
- # Branding
- ac_add_options --enable-official-branding
++export AR=ar
++export NM=nm
++export RANLIB=ranlib
++export STRIP=strip
diff --git a/extra/firefox/rust-static-disable-network-test-on-static-libraries.patch b/extra/firefox/rust-static-disable-network-test-on-static-libraries.patch
index 7bcbde2a..c9ae89cb 100644
--- a/extra/firefox/rust-static-disable-network-test-on-static-libraries.patch
+++ b/extra/firefox/rust-static-disable-network-test-on-static-libraries.patch
@@ -1,27 +1,32 @@
---- firefox-79.0/config/makefiles/rust.mk 2020-07-21 00:49:36.000000000 +0200
-+++ firefox-79.0-rust-static-disable-network-test-on-static-libraries-patch/config/makefiles/rust.mk 2020-08-02 13:56:36.118444982 +0200
-@@ -299,15 +299,15 @@
+diff -rauN a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+--- a/config/makefiles/rust.mk 2020-10-13 20:23:09.920635480 +0200
++++ b/config/makefiles/rust.mk 2020-10-13 20:24:02.273994137 +0200
+@@ -324,17 +324,17 @@
# the chance of proxy bypasses originating from rust code.
- # The check only works when rust code is built with -Clto.
+ # The check only works when rust code is built with -Clto but without MOZ_LTO_RUST_CROSS.
# Sanitizers and sancov also fail because compiler-rt hooks network functions.
-ifndef MOZ_PROFILE_GENERATE
-ifeq ($(OS_ARCH), Linux)
-ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
+-ifndef MOZ_LTO_RUST_CROSS
-ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
- $(call py_action,check_binary,--target --networking $@)
-endif
-endif
-endif
-endif
+-endif
+#ifndef MOZ_PROFILE_GENERATE
+#ifeq ($(OS_ARCH), Linux)
+#ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
++#ifndef MOZ_LTO_RUST
+#ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
+# $(call py_action,check_binary,--target --networking $@)
+#endif
+#endif
+#endif
+#endif
++#endif
force-cargo-library-check:
$(call CARGO_CHECK) --lib $(cargo_target_flag) $(rust_features_flag)