--- a/mozilla-firefox.SlackBuild 2021-08-24 21:29:28.183004321 +0300 +++ b/mozilla-firefox.SlackBuild 2021-09-08 20:15:56.607588628 +0300 @@ -42,6 +42,9 @@ # "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)" LANG=C +# LTO needs more open files +ulimit -n 4096 + # Add a shell script to start the firefox binary with MOZ_ALLOW_DOWNGRADE=1 # to avoid backing up (and disabling) the user profile if a browser downgrade # is detected. We made it fine for years without this feature, and all the @@ -152,6 +155,12 @@ elif [ "$ARCH" = "armel" ]; then SLKCFLAGS="-g0 -march=armv4t" LIBDIRSUFFIX="" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -g0 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "riscv64" ]; then + SLKCFLAGS="-O2 -g0 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-g0" LIBDIRSUFFIX="" @@ -228,8 +237,16 @@ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ +xzcat $CWD/build-arm-libopus.patch.xz | patch -p1 --verbose || exit 1 + # Our building options, in a configure-like display ;) OPTIONS="\ + --host=$ARCH-slackware-linux \ + --target=$ARCH-slackware-linux \ + --disable-av1 \ + --disable-jemalloc \ + --disable-webrtc \ + \ --enable-official-branding \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -242,7 +259,6 @@ --enable-application=browser \ --enable-default-toolkit=cairo-gtk3-wayland \ --enable-linker=$LINKER \ - --enable-optimize \ $GOOGLE_API_KEY \ --disable-strip \ --disable-install-strip \ @@ -252,7 +268,6 @@ --disable-crashreporter \ --disable-debug-symbols \ --disable-debug \ - --disable-elf-hack \ --disable-updater" # Complains about missing APNG support in Slackware's libpng: # --with-system-png \ @@ -312,6 +327,12 @@ # Add the $OPTIONS above to .mozconfig: for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done +# ARM: see https://bugzilla.redhat.com/show_bug.cgi?id=1426850 +# This isn't added using $SLKCONFARGS because it doesn't cater for things with spaces in: +# unless I edit the for loop above to use IFS with some other variable. +# this is easier right now ;-) +echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig + # https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization # Thanks to ArchLinux and Gentoo for the additional hints. if [ "$PGO" = "yes" ]; then