]> git.pld-linux.org Git - packages/codeblocks.git/blob - gcc6.patch
- updated to latest SVN snapshot
[packages/codeblocks.git] / gcc6.patch
1 From 70289a879f7a48a47dd0219cc5d3a9a1dee076a8 Mon Sep 17 00:00:00 2001
2 From: Jens Lody <jens@codeblocks.org>
3 Date: Wed, 27 Jul 2016 02:09:07 +0200
4 Subject: Workaround for gcc6 optimization bug.
5
6
7 diff --git a/configure.ac b/configure.ac
8 index 7f80a3f..f178ee2 100644
9 --- a/configure.ac
10 +++ b/configure.ac
11 @@ -276,6 +276,7 @@ esac
12  
13  CB_GCC_VERSION
14  AM_CONDITIONAL([HAVE_GCC48], [test $GCC_MAJOR_VERSION -gt 4 -o $GCC_MAJOR_VERSION -eq 4 -a $GCC_MINOR_VERSION -ge 8])
15 +AM_CONDITIONAL([HAVE_GCC6], [test $GCC_MAJOR_VERSION -ge 6])
16  
17  AC_MSG_CHECKING([for wxWidgets >= 2.9.0])
18  AM_CONDITIONAL([HAVE_WX29], [test $wx_config_major_version -gt 2 -o $wx_config_major_version -eq 2 -a $wx_config_minor_version -ge 9])
19 diff --git a/src/sdk/wxpropgrid/Makefile.am b/src/sdk/wxpropgrid/Makefile.am
20 index 2b1a107..f427fb4 100644
21 --- a/src/sdk/wxpropgrid/Makefile.am
22 +++ b/src/sdk/wxpropgrid/Makefile.am
23 @@ -3,6 +3,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
24                 -DEXPORT_LIB \
25                 -DwxPG_SUPPORT_TOOLTIPS
26  
27 +if HAVE_GCC6
28 +AM_CPPFLAGS += -fno-delete-null-pointer-checks
29 +endif
30 +
31  noinst_LTLIBRARIES = libwxpropgrid.la
32  
33  libwxpropgrid_la_SOURCES = ./src/advprops.cpp \
34 From 6350b94c5379563ac2a861de8c2c197208782435 Mon Sep 17 00:00:00 2001
35 From: jenslody <jenslody@2a5c6006-c6dd-42ca-98ab-0921f2732cef>
36 Date: Sun, 17 Apr 2016 21:31:25 +0000
37 Subject: * Fix variable declarations, that conflict with internal
38  compiler-defines, so C::B is compilable with gcc6 .
39
40 git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@10833 2a5c6006-c6dd-42ca-98ab-0921f2732cef
41
42 diff --git a/src/include/prep.h b/src/include/prep.h
43 index 5843bb8..6397900 100644
44 --- a/src/include/prep.h
45 +++ b/src/include/prep.h
46 @@ -102,9 +102,9 @@ template<typename T>inline void DeleteArray(T*& p){delete[] p; p = nullptr;}
47      platform::id
48          Value of type platform::identifier describing the target platform
49  
50 -    platform::windows, platform::macosx, platform::linux
51 +    platform::windows, platform::macosx, platform::Linux
52      platform::freebsd, platform::netbsd, platform::openbsd
53 -    platform::darwin,  platform::solaris, platform::unix
54 +    platform::darwin,  platform::solaris, platform::Unix
55          Boolean value that evaluates to true if the target platform is the same as the variable's name, false otherwise.
56          Using the platform booleans is equivalent to using platform::id, but results in nicer code.
57  
58 @@ -185,13 +185,13 @@ namespace platform
59  
60      const bool windows = (id == platform_windows);
61      const bool macosx  = (id == platform_macosx);
62 -    const bool linux   = (id == platform_linux);
63 +    const bool Linux   = (id == platform_linux);
64      const bool freebsd = (id == platform_freebsd);
65      const bool netbsd  = (id == platform_netbsd);
66      const bool openbsd = (id == platform_openbsd);
67      const bool darwin  = (id == platform_darwin);
68      const bool solaris = (id == platform_solaris);
69 -    const bool unix    = (linux | freebsd | netbsd | openbsd | darwin | solaris);
70 +    const bool Unix    = (Linux | freebsd | netbsd | openbsd | darwin | solaris);
71  
72      const int bits = 8*sizeof(void*);
73  
74 diff --git a/src/plugins/compilergcc/compilergcc.cpp b/src/plugins/compilergcc/compilergcc.cpp
75 index 1c255b6..e8b8443 100644
76 --- a/src/plugins/compilergcc/compilergcc.cpp
77 +++ b/src/plugins/compilergcc/compilergcc.cpp
78 @@ -871,7 +871,7 @@ void CompilerGCC::DoRegisterCompilers()
79      CompilerFactory::RegisterCompiler(new CompilerGDC);
80      CompilerFactory::RegisterCompiler(new CompilerGNUFortran);
81      CompilerFactory::RegisterCompiler(new CompilerG95);
82 -    if (platform::windows || platform::linux || nonPlatComp)
83 +    if (platform::windows || platform::Linux || nonPlatComp)
84          CompilerFactory::RegisterCompiler(new CompilerGNUARM);
85  
86      // register pure XML compilers
87 @@ -925,7 +925,7 @@ void CompilerGCC::DoRegisterCompilers()
88                  else if (test == wxT("macosx"))
89                      val = platform::macosx;
90                  else if (test == wxT("linux"))
91 -                    val = platform::linux;
92 +                    val = platform::Linux;
93                  else if (test == wxT("freebsd"))
94                      val = platform::freebsd;
95                  else if (test == wxT("netbsd"))
96 @@ -937,7 +937,7 @@ void CompilerGCC::DoRegisterCompilers()
97                  else if (test == wxT("solaris"))
98                      val = platform::solaris;
99                  else if (test == wxT("unix"))
100 -                    val = platform::unix;
101 +                    val = platform::Unix;
102              }
103              if (val)
104                  CompilerFactory::RegisterCompiler(
105 diff --git a/src/plugins/contrib/lib_finder/processingdlg.cpp b/src/plugins/contrib/lib_finder/processingdlg.cpp
106 index 77ccfd2..03c93cf 100644
107 --- a/src/plugins/contrib/lib_finder/processingdlg.cpp
108 +++ b/src/plugins/contrib/lib_finder/processingdlg.cpp
109 @@ -423,7 +423,7 @@ void ProcessingDlg::CheckFilter(
110                      }
111                  }
112  
113 -                if ( platform::linux )
114 +                if ( platform::Linux )
115                  {
116                      if ( Platform==_T("lin") || Platform==_T("linux") )
117                      {
118 @@ -477,7 +477,7 @@ void ProcessingDlg::CheckFilter(
119                      }
120                  }
121  
122 -                if ( platform::unix )
123 +                if ( platform::Unix )
124                  {
125                      if ( Platform==_T("unix") || Platform==_T("un*x") )
126                      {
127 diff --git a/src/plugins/projectsimporter/msvc10loader.cpp b/src/plugins/projectsimporter/msvc10loader.cpp
128 index 6a88e79..19f692b 100644
129 --- a/src/plugins/projectsimporter/msvc10loader.cpp
130 +++ b/src/plugins/projectsimporter/msvc10loader.cpp
131 @@ -50,7 +50,7 @@ MSVC10Loader::MSVC10Loader(cbProject* project) :
132      //ctor
133      if (platform::windows)
134          m_PlatformName = _T("Win32");
135 -    else if (platform::linux)
136 +    else if (platform::Linux)
137          m_PlatformName = _T("Linux");
138      else if (platform::macosx)
139          m_PlatformName = _T("MacOSX");
140 diff --git a/src/plugins/projectsimporter/msvc7loader.cpp b/src/plugins/projectsimporter/msvc7loader.cpp
141 index 568357f..a2f56f8 100644
142 --- a/src/plugins/projectsimporter/msvc7loader.cpp
143 +++ b/src/plugins/projectsimporter/msvc7loader.cpp
144 @@ -39,7 +39,7 @@ MSVC7Loader::MSVC7Loader(cbProject* project)
145      //ctor
146      if (platform::windows)
147          m_PlatformName = _T("Win32");
148 -    else if (platform::linux)
149 +    else if (platform::Linux)
150          m_PlatformName = _T("Linux");
151      else if (platform::macosx)
152          m_PlatformName = _T("MacOSX");
153 diff --git a/src/sdk/compileoptionsbase.cpp b/src/sdk/compileoptionsbase.cpp
154 index 20b7e77..700d39c 100644
155 --- a/src/sdk/compileoptionsbase.cpp
156 +++ b/src/sdk/compileoptionsbase.cpp
157 @@ -64,7 +64,7 @@ bool CompileOptionsBase::SupportsCurrentPlatform() const
158  {
159      if(platform::windows)
160          return m_Platform & spWindows;
161 -    if(platform::unix)
162 +    if(platform::Unix)
163          return m_Platform & spUnix;
164      if(platform::macosx)
165          return m_Platform & spMac;
166 diff --git a/src/sdk/compiler.cpp b/src/sdk/compiler.cpp
167 index 7b29618..45ed969 100644
168 --- a/src/sdk/compiler.cpp
169 +++ b/src/sdk/compiler.cpp
170 @@ -1149,7 +1149,7 @@ bool Compiler::EvalXMLCondition(const wxXmlNode* node)
171          else if (test == wxT("macosx"))
172              val = platform::macosx;
173          else if (test == wxT("linux"))
174 -            val = platform::linux;
175 +            val = platform::Linux;
176          else if (test == wxT("freebsd"))
177              val = platform::freebsd;
178          else if (test == wxT("netbsd"))
179 @@ -1161,7 +1161,7 @@ bool Compiler::EvalXMLCondition(const wxXmlNode* node)
180          else if (test == wxT("solaris"))
181              val = platform::solaris;
182          else if (test == wxT("unix"))
183 -            val = platform::unix;
184 +            val = platform::Unix;
185      }
186      else if (node->GetAttribute(wxT("exec"), &test))
187      {
188 diff --git a/src/sdk/compiletargetbase.cpp b/src/sdk/compiletargetbase.cpp
189 index 85f57ed..19c5647 100644
190 --- a/src/sdk/compiletargetbase.cpp
191 +++ b/src/sdk/compiletargetbase.cpp
192 @@ -264,7 +264,7 @@ void CompileTargetBase::GenerateTargetFilename(wxString& filename) const
193              {
194                  wxString prefix = wxEmptyString;
195                  // On linux, "lib" is the common prefix for this platform
196 -                if (platform::linux)
197 +                if (platform::Linux)
198                      prefix = wxT("lib");
199                  // FIXME (Morten#5#): What about Mac (Windows is OK)?!
200  
201 diff --git a/src/sdk/configmanager.cpp b/src/sdk/configmanager.cpp
202 index 15a931e..4b6cbfc 100644
203 --- a/src/sdk/configmanager.cpp
204 +++ b/src/sdk/configmanager.cpp
205 @@ -261,11 +261,11 @@ void CfgMgrBldr::SwitchTo(const wxString& fileName)
206  
207      if (platform::windows)
208          info.append(_T("\n\t Windows "));
209 -    if (platform::linux)
210 +    if (platform::Linux)
211          info.append(_T("\n\t Linux "));
212      if (platform::macosx)
213          info.append(_T("\n\t Mac OS X "));
214 -    if (platform::unix)
215 +    if (platform::Unix)
216          info.append(_T("\n\t Unix "));
217  
218      info.append(platform::unicode ? _T("Unicode ") : _T("ANSI "));
219 diff --git a/src/sdk/editormanager.cpp b/src/sdk/editormanager.cpp
220 index 0a9ab0f..929ae82 100644
221 --- a/src/sdk/editormanager.cpp
222 +++ b/src/sdk/editormanager.cpp
223 @@ -1845,7 +1845,7 @@ void EditorManager::CollectDefines(CodeBlocksEvent& event)
224              defines.Add(wxT("__WXOSX_MAC__"));
225              defines.Add(wxT("__APPLE__"));
226          }
227 -        else if (platform::linux)
228 +        else if (platform::Linux)
229          {
230              defines.Add(wxT("LINUX"));
231              defines.Add(wxT("linux"));
232 @@ -1880,7 +1880,7 @@ void EditorManager::CollectDefines(CodeBlocksEvent& event)
233              defines.Add(wxT("__SUNOS__"));
234              defines.Add(wxT("__SOLARIS__"));
235          }
236 -        if (platform::unix)
237 +        if (platform::Unix)
238          {
239              defines.Add(wxT("unix"));
240              defines.Add(wxT("__unix"));
This page took 0.191063 seconds and 3 git commands to generate.