Magellan Linux

Annotation of /trunk/mozilla-firefox/patches/firefox-46.0.1-gcc61.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2788 - (hide annotations) (download)
Fri May 20 13:21:58 2016 UTC (8 years ago) by niro
File size: 2854 byte(s)
-fixed build with gcc-6.1
1 niro 2788 diff -r 34544e6dfc19 -r 55212130f19d config/gcc-stl-wrapper.template.h
2     --- a/config/gcc-stl-wrapper.template.h Fri Mar 11 11:45:09 2016 +0800
3     +++ b/config/gcc-stl-wrapper.template.h Thu Mar 10 16:54:05 2016 +0900
4     @@ -12,33 +12,40 @@
5     // compiling ObjC.
6     #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
7     # error "STL code can only be used with -fno-exceptions"
8     #endif
9    
10     // Silence "warning: #include_next is a GCC extension"
11     #pragma GCC system_header
12    
13     +// Don't include mozalloc for cstdlib. See bug 1245076.
14     +#ifndef moz_dont_include_mozalloc_for_cstdlib
15     +# define moz_dont_include_mozalloc_for_cstdlib
16     +#endif
17     +#ifndef moz_dont_include_mozalloc_for_${HEADER}
18     // mozalloc.h wants <new>; break the cycle by always explicitly
19     // including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
20     //
21     // `#include_next' does not distinguish between <file> and "file"
22     // inclusion, nor does it check that the file you specify has the
23     // same name as the current file. It simply looks for the file
24     // named, starting with the directory in the search path after the
25     // one where the current file was found.
26     -#include_next <new>
27     +# include_next <new>
28    
29     // See if we're in code that can use mozalloc. NB: this duplicates
30     // code in nscore.h because nscore.h pulls in prtypes.h, and chromium
31     // can't build with that being included before base/basictypes.h.
32     -#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
33     -# include "mozilla/mozalloc.h"
34     -#else
35     -# error "STL code can only be used with infallible ::operator new()"
36     +# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
37     +# include "mozilla/mozalloc.h"
38     +# else
39     +# error "STL code can only be used with infallible ::operator new()"
40     +# endif
41     +
42     #endif
43    
44     #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
45     // Enable checked iterators and other goodies
46     //
47     // FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
48     // Figure out how to resolve this with -fno-rtti. Maybe build with
49     // -frtti in DEBUG builds?
50     diff -r 34544e6dfc19 -r 55212130f19d gfx/graphite2/src/Collider.cpp
51     --- a/gfx/graphite2/src/Collider.cpp Fri Mar 11 11:45:09 2016 +0800
52     +++ b/gfx/graphite2/src/Collider.cpp Thu Mar 10 16:54:05 2016 +0900
53     @@ -21,17 +21,17 @@
54    
55     Alternatively, the contents of this file may be used under the terms of the
56     Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
57     License, as published by the Free Software Foundation, either version 2
58     of the License or (at your option) any later version.
59     */
60     #include <algorithm>
61     #include <limits>
62     -#include <math.h>
63     +#include <cmath>
64     #include <string>
65     #include <functional>
66     #include "inc/Collider.h"
67     #include "inc/Segment.h"
68     #include "inc/Slot.h"
69     #include "inc/GlyphCache.h"
70     #include "inc/Sparse.h"
71