summaryrefslogtreecommitdiffstats
path: root/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild')
-rwxr-xr-xsource/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild b/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
index 469b0e32c..e81df3bdc 100755
--- a/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
+++ b/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2016, 2017, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2016, 2017, 2018, 2019, 2020, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -117,13 +117,20 @@ fi
export CC=${CC:-clang}
export CXX=${CXX:-clang++}
-# Keep memory usage as low as possible when linking:
-SLKLDFLAGS=" -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats -Wl,--reduce-memory-overheads"
-export LDFLAGS="$SLKLDFLAGS"
-export MOZ_LINK_FLAGS="$SLKLDFLAGS"
-
# Set linker to use:
-LINKER=bfd
+if [ "$CC" = "clang" ]; then
+ # Upstream default:
+ LINKER=lld
+else
+ LINKER=bfd
+fi
+
+# Keep memory usage as low as possible when linking:
+if [ ! "$LINKER" = "lld" ]; then
+ SLKLDFLAGS=" -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats -Wl,--reduce-memory-overheads"
+ export LDFLAGS="$SLKLDFLAGS"
+ export MOZ_LINK_FLAGS="$SLKLDFLAGS"
+fi
# Put Rust objects on a diet to keep the linker from running into memory
# issues (especially on 32-bit):
@@ -219,6 +226,7 @@ OPTIONS="\
--disable-crashreporter \
--disable-debug-symbols \
--disable-debug \
+ --disable-elf-hack \
--disable-tests \
--disable-updater \
--host=$ARCH-slackware-linux \