diff options
Diffstat (limited to 'source/xap/mozilla-firefox')
-rwxr-xr-x | source/xap/mozilla-firefox/gold/gold | 2 | ||||
l--------- | source/xap/mozilla-firefox/gold/ld | 1 | ||||
-rwxr-xr-x | source/xap/mozilla-firefox/mozilla-firefox.SlackBuild | 56 |
3 files changed, 21 insertions, 38 deletions
diff --git a/source/xap/mozilla-firefox/gold/gold b/source/xap/mozilla-firefox/gold/gold deleted file mode 100755 index 8c86d3b0..00000000 --- a/source/xap/mozilla-firefox/gold/gold +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -/usr/bin/ld.gold "$@" diff --git a/source/xap/mozilla-firefox/gold/ld b/source/xap/mozilla-firefox/gold/ld deleted file mode 120000 index 78a06a2a..00000000 --- a/source/xap/mozilla-firefox/gold/ld +++ /dev/null @@ -1 +0,0 @@ -gold
\ No newline at end of file diff --git a/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild b/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild index 4018d57e..d184dc45 100755 --- a/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild +++ b/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild @@ -72,24 +72,17 @@ fi if [ "$(uname -m)" = "x86_64" -a "$(file -L /usr/bin/gcc | grep 80386 | grep 32-bit)" != "" ]; then COMPILE_X86_UNDER_X86_64=true ARCH=i686 - # Also use the gold linker for this: - PATH="$(pwd)/gold:$PATH" - export CC=${CC:-"gcc -B$(pwd)/gold"} - export CXX=${CXX:-"g++ -B$(pwd)/gold"} -elif [ "$ARCH" = "i686" ]; then - # This might also help with the linker memory situation on some $ARCH. Feel free - # to match any other $ARCH that could benefit from this. - SLKLDFLAGS=" -Wl,--as-needed -Wl,--reduce-memory-overheads -Wl,--no-keep-memory -Wl,--stats" - export LDFLAGS="$SLKLDFLAGS" - export MOZ_LINK_FLAGS="$SLKLDFLAGS" -else - # Link using gold. This also helps prevent running out of memory on 32-bit - # systems, and avoids a recurring build failure with GNU ld on other systems. - PATH="$(pwd)/gold:$PATH" - export CC=${CC:-"gcc -B$(pwd)/gold"} - export CXX=${CXX:-"g++ -B$(pwd)/gold"} fi +# Choose a compiler (gcc/g++ or clang/clang++): +export CC=${CC:-gcc} +export CXX=${CXX:-g++} + +# Keep memory usage as low as possible when linking: +SLKLDFLAGS=" -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats" +export LDFLAGS="$SLKLDFLAGS" +export MOZ_LINK_FLAGS="$SLKLDFLAGS" + # Put Rust objects on a diet to keep the linker from running into memory # issues (especially on 32-bit): export RUSTFLAGS="-Cdebuginfo=0" @@ -122,33 +115,26 @@ export RUSTFLAGS="-Cdebuginfo=0" PGO=${PGO:-no} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="" + SLKCFLAGS="-Os" LIBDIRSUFFIX="" - OPTIMIZE=${OPTIMIZE:-"-O1"} elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="" + SLKCFLAGS="-Os" LIBDIRSUFFIX="" - OPTIMIZE=${OPTIMIZE:-"-O1"} elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="" + SLKCFLAGS="-O2" LIBDIRSUFFIX="" - OPTIMIZE=${OPTIMIZE:-"-O1"} elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-fPIC" + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" - OPTIMIZE=${OPTIMIZE:-"-O1"} elif [ "$ARCH" = "arm" ]; then - SLKCFLAGS="-march=armv4 -mtune=xscale" + SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" LIBDIRSUFFIX="" - OPTIMIZE=${OPTIMIZE:-"-O1"} elif [ "$ARCH" = "armel" ]; then - SLKCFLAGS="-march=armv4t" + SLKCFLAGS="-O2 -march=armv4t" LIBDIRSUFFIX="" - OPTIMIZE=${OPTIMIZE:-"-O1"} else - SLKCFLAGS="" + SLKCFLAGS="-O2" LIBDIRSUFFIX="" - OPTIMIZE=${OPTIMIZE:-"-O1"} fi TMP=${TMP:-/tmp} @@ -226,13 +212,16 @@ OPTIONS="\ --enable-alsa \ --enable-application=browser \ --enable-default-toolkit=cairo-gtk3 \ + --enable-linker=gold \ --enable-startup-notification \ $GOOGLE_API_KEY \ --enable-strip \ --enable-cpp-rtti \ --enable-accessibility \ --disable-crashreporter \ - --disable-debug" + --disable-debug-symbols \ + --disable-debug \ + --disable-optimize" # Complains about missing APNG support in Slackware's libpng: # --with-system-png \ # This option breaks mozilla-12.0: @@ -257,7 +246,7 @@ export BUILD_OFFICIAL="1" export MOZ_PHOENIX="1" export MOZ_PACKAGE_JSSHELL="1" export CFLAGS="$SLKCFLAGS" -export CXXFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS -fno-delete-null-pointer-checks" export MOZ_MAKE_FLAGS="$NUMJOBS" # Clear some variables that could break the build @@ -281,9 +270,6 @@ fi echo "export CC=\"${CC}\"" >> .mozconfig echo "export CXX=\"${CXX}\"" >> .mozconfig -# Set options for $OPTIMIZE: -echo "ac_add_options --enable-optimize=\"${OPTIMIZE}\"" >> .mozconfig - if [ "$COMPILE_X86_UNDER_X86_64" = "true" ]; then # Compile for i686 under an x86_64 kernel: echo "ac_add_options --host=i686-pc-linux-gnu" >> .mozconfig |