summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-04-04 17:04:20 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2020-04-04 17:04:20 +0200
commit8f2722474333379dcd8c875f23d274fe2fb25c61 (patch)
treeb58aae2a80a280feec93050c7906c7c5cd676570
parent11463df0cc4a38a0ca189b1cfaadcd2f08d44dda (diff)
extra/firefox: split mozconfig for i686/pentium4, fixed non-SIMD build on i686
-rw-r--r--extra/firefox/PKGBUILD26
-rw-r--r--extra/firefox/mozconfig-i686.patch22
-rw-r--r--extra/firefox/mozconfig-pentium4.patch (renamed from extra/firefox/mozconfig.patch)0
3 files changed, 44 insertions, 4 deletions
diff --git a/extra/firefox/PKGBUILD b/extra/firefox/PKGBUILD
index 2fb535b..6eaccdb 100644
--- a/extra/firefox/PKGBUILD
+++ b/extra/firefox/PKGBUILD
@@ -1,8 +1,27 @@
# 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)
-# TODO: document the rest..
-source+=('mozconfig.patch')
-sha256sums+=('708605f390994587277d8357e8452a71fcbfab97394df9678b1b646539e4ce20')
+# disable SIMD (SSE20 for i686
+# set correct compiler and toochain tools
+if [ "${CARCH}" = "pentium4" ]; then
+ source+=('mozconfig-pentium4.patch')
+ sha256sums+=('708605f390994587277d8357e8452a71fcbfab97394df9678b1b646539e4ce20')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -d .. -Np1 -i "$srcdir/mozconfig-pentium4.patch"
+ '
+)"
+fi
+if [ "${CARCH}" = "i686" ]; then
+ source+=('mozconfig-i686.patch')
+ sha256sums+=('b6688e8872da4651653d898ba832d078e30e901bc6b84df07494905320633f22')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -d .. -Np1 -i "$srcdir/mozconfig-i686.patch"
+ '
+)"
+fi
eval "$(
declare -f build | \
sed '
@@ -12,7 +31,6 @@ eval "$(
declare -f prepare | \
sed '
$ i export MOZ_SOURCE_CHANGESET="DEVEDITION_${pkgver//./_}_RELEASE"
- $ i patch -d .. -Np1 -i "$srcdir/mozconfig.patch"
'
)"
diff --git a/extra/firefox/mozconfig-i686.patch b/extra/firefox/mozconfig-i686.patch
new file mode 100644
index 0000000..5230d31
--- /dev/null
+++ b/extra/firefox/mozconfig-i686.patch
@@ -0,0 +1,22 @@
+diff -rauN a/mozconfig b/mozconfig
+--- a/mozconfig 2020-04-04 15:35:35.911990038 +0200
++++ b/mozconfig 2020-04-04 15:36:04.515324252 +0200
+@@ -4,12 +4,12 @@
+ ac_add_options --enable-release
+ ac_add_options --enable-hardening
+ ac_add_options --enable-optimize
+-ac_add_options --enable-rust-simd
+-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
diff --git a/extra/firefox/mozconfig.patch b/extra/firefox/mozconfig-pentium4.patch
index b179e88..b179e88 100644
--- a/extra/firefox/mozconfig.patch
+++ b/extra/firefox/mozconfig-pentium4.patch