Added fix for mozbz#1321579

This commit is contained in:
Martin Stransky 2017-02-23 18:29:07 +01:00
parent 0eb6042fa1
commit 16a08c459e
2 changed files with 45 additions and 1 deletions

View File

@ -98,7 +98,7 @@ ExcludeArch: armv7hl
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 51.0.1
Release: 5%{?pre_tag}%{?dist}
Release: 6%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
@ -145,6 +145,7 @@ Patch406: mozilla-256180.patch
# fix various rendering problems
Patch407: widget-rebase.patch
Patch408: mozilla-1319374.patch
Patch409: mozilla-1321579.patch
# Debian patches
Patch500: mozilla-440908.patch
@ -295,6 +296,7 @@ cd %{tarballdir}
%patch407 -p1 -b .widget-rebase
# ppc64 build fix
%patch408 -p1 -b .1319374
%patch409 -p1 -b .1321579
# Debian extension patch
%patch500 -p1 -b .440908
@ -788,6 +790,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Thu Feb 23 2017 Martin Stransky <stransky@redhat.com> - 51.0.1-6
- Added fix for mozbz#1321579
* Thu Feb 23 2017 Martin Stransky <stransky@redhat.com> - 51.0.1-5
- Disabled -O3 optimization on rawhide to make FF usable (rhbz#1422532)

39
mozilla-1321579.patch Normal file
View File

@ -0,0 +1,39 @@
diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -173,16 +173,34 @@ AC_SUBST([LD_IS_BFD])
if test "$GNU_CC"; then
if test -z "$DEVELOPER_OPTIONS"; then
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
fi
CFLAGS="$CFLAGS -fno-math-errno"
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno"
+
+ if test -z "$CLANG_CC"; then
+ case "$CC_VERSION" in
+ 4.*)
+ ;;
+ *)
+ # 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.
+ # Add it first so that a mozconfig can override by setting CFLAGS/CXXFLAGS.
+ CFLAGS="-fno-lifetime-dse $CFLAGS"
+ CXXFLAGS="-fno-lifetime-dse $CXXFLAGS"
+ ;;
+ esac
+ fi
fi
dnl ========================================================
dnl = Identical Code Folding
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(icf,
[ --disable-icf Disable Identical Code Folding],