diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-20 18:20:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-20 18:20:46 -0400 |
commit | fc5870128f8c2ec5e03f7aa340d73b50756e07ec (patch) | |
tree | eea0f54e362c21cecfde0b5bad33cf42dbed3053 /build | |
parent | 6896f6898546ce6bd9dd16901411cfb02528b699 (diff) | |
parent | c5a52404bd6206a481aedc61ea21f9dccf93377a (diff) | |
download | UXP-fc5870128f8c2ec5e03f7aa340d73b50756e07ec.tar UXP-fc5870128f8c2ec5e03f7aa340d73b50756e07ec.tar.gz UXP-fc5870128f8c2ec5e03f7aa340d73b50756e07ec.tar.lz UXP-fc5870128f8c2ec5e03f7aa340d73b50756e07ec.tar.xz UXP-fc5870128f8c2ec5e03f7aa340d73b50756e07ec.zip |
Merge pull request #222 from trav90/buildsystem-work
Force use of level 1 Liftetime DSE optimization with modern GCC
Diffstat (limited to 'build')
-rw-r--r-- | build/autoconf/compiler-opts.m4 | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 57a974435..c47d792f4 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -181,18 +181,15 @@ if test "$GNU_CC"; then if test -z "$CLANG_CC"; then case "$CC_VERSION" in - 4.*) + 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 |