summaryrefslogtreecommitdiff
path: root/extra/firefox
diff options
context:
space:
mode:
Diffstat (limited to 'extra/firefox')
-rw-r--r--extra/firefox/PKGBUILD64
-rw-r--r--extra/firefox/firefox-99.0.1-fdlibm-double.patch15
-rw-r--r--extra/firefox/mozconfig-i686.patch36
-rw-r--r--extra/firefox/mozconfig-pentium4.patch32
4 files changed, 114 insertions, 33 deletions
diff --git a/extra/firefox/PKGBUILD b/extra/firefox/PKGBUILD
index 7c21b896..329e0b96 100644
--- a/extra/firefox/PKGBUILD
+++ b/extra/firefox/PKGBUILD
@@ -4,7 +4,7 @@
# set correct compiler and toochain tools
if [ "${CARCH}" = "pentium4" ]; then
source+=('mozconfig-pentium4.patch')
- sha256sums+=('dd49547b516936fe372f6f63c94e62dd975021ad97bcf31e98551ecff9890aed')
+ sha256sums+=('6aafff15bc3e11137a295869c16bf07aaf110f5fa39545bb27da1a182d1e9b4a')
eval "$(
declare -f prepare | \
sed '
@@ -14,7 +14,7 @@ eval "$(
fi
if [ "${CARCH}" = "i686" ]; then
source+=('mozconfig-i686.patch')
- sha256sums+=('dd49547b516936fe372f6f63c94e62dd975021ad97bcf31e98551ecff9890aed')
+ sha256sums+=('56f7faa75bc16b9948c37e84309efd59c7d932a6f9a579135040fa7f94da35db')
eval "$(
declare -f prepare | \
sed '
@@ -122,6 +122,10 @@ eval "$(
sed '
2 a export MOZ_MAKE_FLAGS=-j1
'
+ declare -f package | \
+ sed '
+ 2 a export MOZ_MAKE_FLAGS=-j1
+ '
)"
# test failure in rust code (complaining about network functions) when PGO is used,
@@ -185,3 +189,59 @@ if [ "${CARCH}" = "i686" ]; then
CFLAGS="$CFLAGS -mmmx"
CXXFLAGS="$CXXFLAGS -mmmx"
fi
+
+# actually, this should be fixed in gcc 11?
+# for now let's build with gcc10
+#
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1713071
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1710235
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100644
+#
+#11:28.22 /usr/include/c++/11.1.0/type_traits:2933:11: error: no type named ‘type’ in
+# ‘struct std::invoke_result<nsTHashtable<nsBaseHashtableET<nsUint32HashKey, RefPtr<m
+#ozilla::dom::AccessibleNode> > >::PutEntry(nsTHashtable<nsBaseHashtableET<nsUint32Ha
+#shKey, RefPtr<mozilla::dom::AccessibleNode> > >::KeyType, const fallible_t&)::<lambd
+#a(auto:7)>, mozilla::Maybe<nsTHashtable<nsBaseHashtableET<nsUint32HashKey, RefPtr<mo
+#zilla::dom::AccessibleNode> > >::EntryHandle>&&>’
+#11:28.22 2933 | using invoke_result_t = typename invoke_result<_Fn, _Args...>::
+#type;
+makedepends+=(gcc10)
+
+# 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’
+source+=('firefox-99.0.1-fdlibm-double.patch')
+sha256sums+=('62695e56daf8c0b8bb921980d475b3fd169b9134188ad9ffaeb9cd660589c23d')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -p1 -i "$srcdir/firefox-99.0.1-fdlibm-double.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"
+ '
+)"
diff --git a/extra/firefox/firefox-99.0.1-fdlibm-double.patch b/extra/firefox/firefox-99.0.1-fdlibm-double.patch
new file mode 100644
index 00000000..ffd4b1d7
--- /dev/null
+++ b/extra/firefox/firefox-99.0.1-fdlibm-double.patch
@@ -0,0 +1,15 @@
+diff -rauN firefox-99.0.1/modules/fdlibm/src/math_private.h firefox-99.0.1-fdlibm-double-patch/modules/fdlibm/src/math_private.h
+--- firefox-99.0.1/modules/fdlibm/src/math_private.h 2022-04-12 00:00:09.000000000 +0200
++++ firefox-99.0.1-fdlibm-double-patch/modules/fdlibm/src/math_private.h 2022-04-25 16:47:00.697715429 +0200
+@@ -30,7 +30,11 @@
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
++#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
++typedef long double __double_t;
++#else
+ typedef double __double_t;
++#endif
+ typedef __double_t double_t;
+
+ /*
diff --git a/extra/firefox/mozconfig-i686.patch b/extra/firefox/mozconfig-i686.patch
index 885c51af..f4d3c077 100644
--- a/extra/firefox/mozconfig-i686.patch
+++ b/extra/firefox/mozconfig-i686.patch
@@ -1,24 +1,28 @@
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,8 @@
+ 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-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
-+ac_add_options --disable-lto
-+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
+@@ -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-10
++export CXX=g++-10
++export AR=gcc-ar-10
++export NM=gcc-nm-10
++export RANLIB=gcc-ranlib-10
++export STRIP=strip
diff --git a/extra/firefox/mozconfig-pentium4.patch b/extra/firefox/mozconfig-pentium4.patch
index 885c51af..0201a74f 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
-+ac_add_options --disable-lto
-+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
+@@ -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-10
++export CXX=g++-10
++export AR=gcc-ar-10
++export NM=gcc-nm-10
++export RANLIB=gcc-ranlib-10
++export STRIP=strip