--- a/mozilla-firefox.SlackBuild 2022-08-06 23:56:32.311135904 +0300 +++ b/mozilla-firefox.SlackBuild 2022-10-21 04:53:46.018782340 +0300 @@ -42,6 +42,9 @@ MOZLOCALIZE=${MOZLOCALIZE:-} # "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" = "arm" ]; then 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="" @@ -231,8 +240,16 @@ find . \ \( -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} \ @@ -246,7 +264,6 @@ OPTIONS="\ --enable-application=browser \ --enable-default-toolkit=cairo-gtk3-wayland \ --enable-linker=$LINKER \ - --enable-optimize \ $GOOGLE_API_KEY \ --disable-strip \ --disable-install-strip \ @@ -256,7 +273,6 @@ OPTIONS="\ --disable-crashreporter \ --disable-debug-symbols \ --disable-debug \ - --disable-elf-hack \ --disable-updater" # Complains about missing APNG support in Slackware's libpng: # --with-system-png \ @@ -317,6 +333,12 @@ fi # 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