From 8f2722474333379dcd8c875f23d274fe2fb25c61 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 4 Apr 2020 17:04:20 +0200 Subject: extra/firefox: split mozconfig for i686/pentium4, fixed non-SIMD build on i686 --- extra/firefox/PKGBUILD | 26 ++++++++++++++++++++++---- extra/firefox/mozconfig-i686.patch | 22 ++++++++++++++++++++++ extra/firefox/mozconfig-pentium4.patch | 22 ++++++++++++++++++++++ extra/firefox/mozconfig.patch | 22 ---------------------- 4 files changed, 66 insertions(+), 26 deletions(-) create mode 100644 extra/firefox/mozconfig-i686.patch create mode 100644 extra/firefox/mozconfig-pentium4.patch delete mode 100644 extra/firefox/mozconfig.patch diff --git a/extra/firefox/PKGBUILD b/extra/firefox/PKGBUILD index 2fb535bf..6eaccdb4 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 00000000..5230d314 --- /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-pentium4.patch b/extra/firefox/mozconfig-pentium4.patch new file mode 100644 index 00000000..b179e883 --- /dev/null +++ b/extra/firefox/mozconfig-pentium4.patch @@ -0,0 +1,22 @@ +diff -rauN a/mozconfig b/mozconfig +--- a/mozconfig 2020-04-04 12:27:32.340912278 +0200 ++++ b/mozconfig 2020-04-04 12:28:33.890907786 +0200 +@@ -5,11 +5,12 @@ + 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.patch deleted file mode 100644 index b179e883..00000000 --- a/extra/firefox/mozconfig.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rauN a/mozconfig b/mozconfig ---- a/mozconfig 2020-04-04 12:27:32.340912278 +0200 -+++ b/mozconfig 2020-04-04 12:28:33.890907786 +0200 -@@ -5,11 +5,12 @@ - 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 - -- cgit v1.2.3-70-g09d2