From 04747039ee0c6fd646e22697ef1da31f8924e10b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Apr 2016 12:27:12 +0200 Subject: Polished gcc6 patches --- firefox-gcc-6.0.patch | 26 -------------------------- firefox.spec | 13 ++++++++++--- mozilla-1245076-1.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ mozilla-1245076.patch | 23 +++++++++++++++++++++++ 4 files changed, 82 insertions(+), 29 deletions(-) delete mode 100644 firefox-gcc-6.0.patch create mode 100644 mozilla-1245076-1.patch create mode 100644 mozilla-1245076.patch diff --git a/firefox-gcc-6.0.patch b/firefox-gcc-6.0.patch deleted file mode 100644 index 0a74d36..0000000 --- a/firefox-gcc-6.0.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up firefox-44.0/nsprpub/config/make-system-wrappers.pl.back firefox-44.0/nsprpub/config/make-system-wrappers.pl ---- firefox-44.0/nsprpub/config/make-system-wrappers.pl.back 2016-01-24 00:23:49.000000000 +0100 -+++ firefox-44.0/nsprpub/config/make-system-wrappers.pl 2016-02-02 14:58:45.064112655 +0100 -@@ -19,7 +19,9 @@ while () { - open OUT, ">$output_dir/$_"; - print OUT "#pragma GCC system_header\n"; # suppress include_next warning - print OUT "#pragma GCC visibility push(default)\n"; -+ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#include_next \<$_\>\n"; -+ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#pragma GCC visibility pop\n"; - close OUT; - } -diff -up firefox-44.0/mozglue/build/arm.cpp.old firefox-44.0/mozglue/build/arm.cpp ---- firefox-44.0/mozglue/build/arm.cpp.old 2016-02-03 10:07:29.879526500 +0100 -+++ firefox-44.0/mozglue/build/arm.cpp 2016-02-03 10:08:11.062697517 +0100 -@@ -104,7 +104,9 @@ check_neon(void) - - # elif defined(__linux__) || defined(ANDROID) - # include -+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS - # include -+#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - # include - - enum{ diff --git a/firefox.spec b/firefox.spec index afa3381..c0ad38b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -87,7 +87,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 45.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/projects/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -114,7 +114,6 @@ Patch20: firefox-build-prbool.patch Patch21: firefox-ppc64le.patch Patch24: firefox-debug.patch Patch25: rhbz-1219542-s390-build.patch -Patch26: firefox-gcc-6.0.patch # Fedora specific patches # Unable to install addons from https pages @@ -131,6 +130,8 @@ Patch301: mozilla-1205199.patch Patch302: mozilla-1228540.patch Patch303: mozilla-1228540-1.patch Patch304: mozilla-1253216.patch +Patch305: mozilla-1245076.patch +Patch306: mozilla-1245076-1.patch # Debian patches Patch400: Allow-unsigned-addons-in-usr-lib-share-mozilla-exten.patch @@ -265,7 +266,6 @@ cd %{tarballdir} %ifarch s390 %patch25 -p1 -b .rhbz-1219542-s390 %endif -%patch26 -p1 -b .gcc-6.0 %patch3 -p2 -b .arm @@ -287,6 +287,10 @@ cd %{tarballdir} %patch222 -p1 -b .gtk3-20 %endif +%patch305 -p1 -b .1245076 +%patch306 -p1 -b .1245076-1 + + # Debian extension patch %patch400 -p1 -b .debian-addon %patch401 -p1 -b .440908 @@ -798,6 +802,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Apr 5 2016 Martin Stransky - 45.0.1-5 +- Polished gcc6 patches + * Tue Mar 22 2016 Martin Stransky - 45.0.1-4 - Fixed rhbz#1321355 - broken flash plugin - Added /etc/firefox/pref dir for easy configuration diff --git a/mozilla-1245076-1.patch b/mozilla-1245076-1.patch new file mode 100644 index 0000000..dfc52c2 --- /dev/null +++ b/mozilla-1245076-1.patch @@ -0,0 +1,49 @@ +diff --git a/config/gcc-stl-wrapper.template.h b/config/gcc-stl-wrapper.template.h +--- a/config/gcc-stl-wrapper.template.h ++++ b/config/gcc-stl-wrapper.template.h +@@ -12,33 +12,39 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++#ifndef moz_dont_include_mozalloc_for_${HEADER} + // mozalloc.h wants ; break the cycle by always explicitly + // including here. NB: this is a tad sneaky. Sez the gcc docs: + // + // `#include_next' does not distinguish between and "file" + // inclusion, nor does it check that the file you specify has the + // same name as the current file. It simply looks for the file + // named, starting with the directory in the search path after the + // one where the current file was found. +-#include_next ++# include_next + + // See if we're in code that can use mozalloc. NB: this duplicates + // code in nscore.h because nscore.h pulls in prtypes.h, and chromium + // can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++ + #endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? + diff --git a/mozilla-1245076.patch b/mozilla-1245076.patch new file mode 100644 index 0000000..c3f06f1 --- /dev/null +++ b/mozilla-1245076.patch @@ -0,0 +1,23 @@ +diff --git a/gfx/graphite2/src/Collider.cpp b/gfx/graphite2/src/Collider.cpp +--- a/gfx/graphite2/src/Collider.cpp ++++ b/gfx/graphite2/src/Collider.cpp +@@ -21,17 +21,17 @@ + + Alternatively, the contents of this file may be used under the terms of the + Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public + License, as published by the Free Software Foundation, either version 2 + of the License or (at your option) any later version. + */ + #include + #include +-#include ++#include + #include + #include + #include "inc/Collider.h" + #include "inc/Segment.h" + #include "inc/Slot.h" + #include "inc/GlyphCache.h" + #include "inc/Sparse.h" + + -- cgit