summaryrefslogtreecommitdiff
path: root/build/autoconf/compiler-opts.m4
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-19 11:39:02 -0500
committertrav90 <travawine@protonmail.ch>2018-04-19 11:39:02 -0500
commit0a6fd85ac1b3c1e22a5c216e5fcbf7d192a5fc20 (patch)
tree4be31e751411767871200b5f1c022315bdaf9826 /build/autoconf/compiler-opts.m4
parent0216b346f004c22603511ae9b0b35eaea26f1275 (diff)
downloaduxp-0a6fd85ac1b3c1e22a5c216e5fcbf7d192a5fc20.tar.gz
Force use of level 1 Liftetime DSE optimization on modern GCC
Instead of completely disabling it.
Diffstat (limited to 'build/autoconf/compiler-opts.m4')
-rw-r--r--build/autoconf/compiler-opts.m413
1 files changed, 6 insertions, 7 deletions
diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4
index 57a974435c..d4016b6099 100644
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -183,16 +183,15 @@ if test "$GNU_CC"; then
case "$CC_VERSION" in
4.*)
;;
+ 5.*)
+ ;;
*)
# Lifetime Dead Store Elimination level 2 (default in GCC6+) breaks Gecko.
- # Ideally, we'd use -flifetime-dse=1, but that means we'd forcefully
- # enable it on optimization levels where it would otherwise not be enabled.
- # So we disable it entirely. But since that would mean inconsistency with
- # GCC5, which has level 1 depending on optimization level, disable it on
- # GCC5 as well, because better safe than sorry.
+ # Instead of completely disabling this optimization on newer GCC's,
+ # we'll force them to use level 1 optimization with -flifetime-dse=1.
# Add it first so that a mozconfig can override by setting CFLAGS/CXXFLAGS.
- CFLAGS="-fno-lifetime-dse $CFLAGS"
- CXXFLAGS="-fno-lifetime-dse $CXXFLAGS"
+ CFLAGS="-flifetime-dse=1 $CFLAGS"
+ CXXFLAGS="-flifetime-dse=1 $CXXFLAGS"
;;
esac
fi