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.
7 diff --git a/configure.ac b/configure.ac
8 index 7f80a3f..f178ee2 100644
11 @@ -276,6 +276,7 @@ esac
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])
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) \
25 -DwxPG_SUPPORT_TOOLTIPS
28 +AM_CPPFLAGS += -fno-delete-null-pointer-checks
31 noinst_LTLIBRARIES = libwxpropgrid.la
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 .
40 git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@10833 2a5c6006-c6dd-42ca-98ab-0921f2732cef
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;}
48 Value of type platform::identifier describing the target platform
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.
58 @@ -185,13 +185,13 @@ namespace platform
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);
72 const int bits = 8*sizeof(void*);
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);
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;
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(
113 - if ( platform::linux )
114 + if ( platform::Linux )
116 if ( Platform==_T("lin") || Platform==_T("linux") )
118 @@ -477,7 +477,7 @@ void ProcessingDlg::CheckFilter(
122 - if ( platform::unix )
123 + if ( platform::Unix )
125 if ( Platform==_T("unix") || Platform==_T("un*x") )
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) :
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)
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
159 if(platform::windows)
160 return m_Platform & spWindows;
163 return m_Platform & spUnix;
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;
186 else if (node->GetAttribute(wxT("exec"), &test))
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
194 wxString prefix = wxEmptyString;
195 // On linux, "lib" is the common prefix for this platform
196 - if (platform::linux)
197 + if (platform::Linux)
199 // FIXME (Morten#5#): What about Mac (Windows is OK)?!
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)
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 "));
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__"));
227 - else if (platform::linux)
228 + else if (platform::Linux)
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__"));
236 - if (platform::unix)
237 + if (platform::Unix)
239 defines.Add(wxT("unix"));
240 defines.Add(wxT("__unix"));