Gentoo Archives: gentoo-commits

From: Mikhail Pukhlikov <cynede@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/dotnet-cli/, dev-dotnet/dotnet-cli/files/
Date: Fri, 02 Jun 2017 08:19:40
Message-Id: 1493659397.ee52140d054d1c8b65b864c1357075707891869a.cynede@gentoo
1 commit: ee52140d054d1c8b65b864c1357075707891869a
2 Author: Nexie Kind <nexion.hellborn <AT> gmail <DOT> com>
3 AuthorDate: Mon May 1 17:23:17 2017 +0000
4 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
5 CommitDate: Mon May 1 17:23:17 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=ee52140d
7
8 Compatibility with gcc6 / clang3.9
9
10 dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild | 4 +
11 .../coreclr-1.0.6-clang39-commit-9db7fb1.patch | 115 +++++++++++++++++++++
12 .../files/coreclr-1.0.6-gcc6-clang39.patch | 26 +++++
13 .../coreclr-1.1.1-clang39-commit-9db7fb1.patch | 115 +++++++++++++++++++++
14 .../files/coreclr-1.1.1-exceptionhandling.patch | 11 ++
15 5 files changed, 271 insertions(+)
16
17 diff --git a/dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild b/dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild
18 index abcb719..b4bb750 100644
19 --- a/dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild
20 +++ b/dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild
21 @@ -46,7 +46,11 @@ DEPEND="${RDEPEND}
22 >=sys-devel/gettext-0.19.7"
23
24 PATCHES=(
25 + "${FILESDIR}/coreclr-${CORECLR_V1_0}-gcc6-clang39.patch"
26 + "${FILESDIR}/coreclr-${CORECLR_V1_0}-clang39-commit-9db7fb1.patch"
27 "${FILESDIR}/coreclr-${CORECLR_V1_0}-icu57-commit-352df35.patch"
28 + "${FILESDIR}/coreclr-${PV}-clang39-commit-9db7fb1.patch"
29 + "${FILESDIR}/coreclr-${PV}-exceptionhandling.patch"
30 "${FILESDIR}/corefx-${PV}-init-tools-script.patch"
31 "${FILESDIR}/corefx-${PV}-run-script.patch"
32 )
33
34 diff --git a/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-clang39-commit-9db7fb1.patch b/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-clang39-commit-9db7fb1.patch
35 new file mode 100644
36 index 0000000..5f243bb
37 --- /dev/null
38 +++ b/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-clang39-commit-9db7fb1.patch
39 @@ -0,0 +1,115 @@
40 +diff --git a/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp b/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp
41 +index 26e3d6c..59f217c 100644
42 +--- a/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp
43 ++++ b/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp
44 +@@ -90,7 +90,6 @@ IDacDbiInterface::IAllocator * g_pAllocator = NULL;
45 + //
46 +
47 + // Need a class to serve as a tag that we can use to overload New/Delete.
48 +-#define forDbi (*(forDbiWorker *)NULL)
49 +
50 + void * operator new(size_t lenBytes, const forDbiWorker &)
51 + {
52 +diff --git a/coreclr-1.0.6/src/debug/ee/debugger.h b/coreclr-1.0.6/src/debug/ee/debugger.h
53 +index 6368647..59d1e66 100644
54 +--- a/coreclr-1.0.6/src/debug/ee/debugger.h
55 ++++ b/coreclr-1.0.6/src/debug/ee/debugger.h
56 +@@ -3512,10 +3512,10 @@ class DebuggerEval
57 + * ------------------------------------------------------------------------ */
58 +
59 + class InteropSafe {};
60 +-#define interopsafe (*(InteropSafe*)NULL)
61 ++SELECTANY InteropSafe interopsafe;
62 +
63 + class InteropSafeExecutable {};
64 +-#define interopsafeEXEC (*(InteropSafeExecutable*)NULL)
65 ++SELECTANY InteropSafeExecutable interopsafeEXEC;
66 +
67 + #ifndef DACCESS_COMPILE
68 + inline void * __cdecl operator new(size_t n, const InteropSafe&)
69 +diff --git a/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h b/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h
70 +index 055b8ec..54ab11a 100644
71 +--- a/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h
72 ++++ b/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h
73 +@@ -839,7 +839,8 @@ class ArrayStorage
74 + {
75 + // Help mitigate the impact of buffer overflow
76 + // Fail fast with a null-reference AV
77 +- return *(static_cast<T*>(0)) ;
78 ++ volatile char* nullPointer = nullptr;
79 ++ *nullPointer;
80 + }
81 + return m_array[ i ];
82 + }
83 +diff --git a/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h b/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h
84 +index e61e240..24c3e24 100644
85 +--- a/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h
86 ++++ b/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h
87 +@@ -32,7 +32,7 @@
88 + template<class T> void DeleteDbiMemory(T *p);
89 + // Need a class to serve as a tag that we can use to overload New/Delete.
90 + class forDbiWorker {};
91 +-#define forDbi (*(forDbiWorker *)NULL)
92 ++SELECTANY forDbiWorker forDbi;
93 + extern void * operator new(size_t lenBytes, const forDbiWorker &);
94 + extern void * operator new[](size_t lenBytes, const forDbiWorker &);
95 + extern void operator delete(void *p, const forDbiWorker &);
96 +diff --git a/coreclr-1.0.6/src/pal/src/exception/seh.cpp b/coreclr-1.0.6/src/pal/src/exception/seh.cpp
97 +index 473c490..ad09e02 100644
98 +--- a/coreclr-1.0.6/src/pal/src/exception/seh.cpp
99 ++++ b/coreclr-1.0.6/src/pal/src/exception/seh.cpp
100 +@@ -274,7 +274,7 @@ SEHProcessException(PAL_SEHException* exception)
101 + {
102 + // The exception happened in the page right below the stack limit,
103 + // so it is a stack overflow
104 +- write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
105 ++ (void)write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
106 + PROCAbort();
107 + }
108 + }
109 +diff --git a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp
110 +index 4bef170..82061ac 100644
111 +--- a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp
112 ++++ b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp
113 +@@ -277,7 +277,7 @@ DWORD TP_GetFullPathName(LPWSTR fileName, DWORD nBufferLength, LPWSTR lpBuffer)
114 + return GetFullPathNameW(fileName, nBufferLength, lpBuffer, NULL);
115 + #else
116 + char nativeFullPath[MAX_PATH];
117 +- realpath(HackyConvertToSTR(fileName), nativeFullPath);
118 ++ (void)realpath(HackyConvertToSTR(fileName), nativeFullPath);
119 + LPWSTR fullPathForCLR = HackyConvertToWSTR(nativeFullPath);
120 + wcscpy_s(lpBuffer, MAX_PATH, fullPathForCLR);
121 + return wcslen(lpBuffer);
122 +diff --git a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h
123 +index 49e8f88..c196b0c 100644
124 +--- a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h
125 ++++ b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h
126 +@@ -87,7 +87,7 @@ typedef void* HMODULE;
127 + typedef void* ULONG_PTR;
128 + typedef unsigned error_t;
129 + typedef void* LPVOID;
130 +-typedef char BYTE;
131 ++typedef unsigned char BYTE;
132 + typedef WCHAR OLECHAR;
133 + #endif
134 +
135 +diff --git a/coreclr-1.0.6/tests/src/Interop/common/types.h b/coreclr-1.0.6/tests/src/Interop/common/types.h
136 +index 7d7f776..cb59c42 100755
137 +--- a/coreclr-1.0.6/tests/src/Interop/common/types.h
138 ++++ b/coreclr-1.0.6/tests/src/Interop/common/types.h
139 +@@ -28,7 +28,7 @@ typedef void* HMODULE;
140 + typedef void* ULONG_PTR;
141 + typedef unsigned error_t;
142 + typedef void* LPVOID;
143 +-typedef char BYTE;
144 ++typedef unsigned char BYTE;
145 + typedef WCHAR OLECHAR;
146 +
147 + typedef unsigned int UINT_PTR;
148 +@@ -54,4 +54,4 @@ typedef int* DWORD_PTR;
149 + #define FALSE 0
150 + #endif
151 +
152 +-#endif //_INTEROP_TYPES__H
153 +\ No newline at end of file
154 ++#endif //_INTEROP_TYPES__H
155
156 diff --git a/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-gcc6-clang39.patch b/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-gcc6-clang39.patch
157 new file mode 100644
158 index 0000000..d921dc3
159 --- /dev/null
160 +++ b/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-gcc6-clang39.patch
161 @@ -0,0 +1,26 @@
162 +diff -rupN a/coreclr-1.0.6/src/pal/src/include/pal/palinternal.h b/coreclr-1.0.6/src/pal/src/include/pal/palinternal.h
163 +--- a/coreclr-1.0.6/src/pal/src/include/pal/palinternal.h 2017-04-27 21:06:55.268009100 +0300
164 ++++ b/coreclr-1.0.6/src/pal/src/include/pal/palinternal.h 2017-04-27 21:08:23.705175087 +0300
165 +@@ -567,6 +567,8 @@ function_name() to call the system's imp
166 + #endif
167 + #include <ctype.h>
168 +
169 ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1
170 ++
171 + #define _WITH_GETLINE
172 + #include <stdio.h>
173 + #include <stdlib.h>
174 +diff -rupN a/coreclr-1.0.6/src/pal/src/include/pal/sharedmemory.h b/coreclr-1.0.6/src/pal/src/include/pal/sharedmemory.h
175 +--- a/coreclr-1.0.6/src/pal/src/include/pal/sharedmemory.h 2017-04-27 21:06:55.268009100 +0300
176 ++++ b/coreclr-1.0.6/src/pal/src/include/pal/sharedmemory.h 2017-04-27 21:07:44.351101225 +0300
177 +@@ -182,6 +182,10 @@ public:
178 + virtual void Close(bool isAbruptShutdown, bool releaseSharedData)
179 + {
180 + }
181 ++
182 ++ virtual ~SharedMemoryProcessDataBase()
183 ++ {
184 ++ }
185 + };
186 +
187 + class SharedMemoryProcessDataHeader
188
189 diff --git a/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-clang39-commit-9db7fb1.patch b/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-clang39-commit-9db7fb1.patch
190 new file mode 100644
191 index 0000000..9c95b85
192 --- /dev/null
193 +++ b/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-clang39-commit-9db7fb1.patch
194 @@ -0,0 +1,115 @@
195 +diff --git a/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp b/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp
196 +index 26e3d6c..59f217c 100644
197 +--- a/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp
198 ++++ b/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp
199 +@@ -90,7 +90,6 @@ IDacDbiInterface::IAllocator * g_pAllocator = NULL;
200 + //
201 +
202 + // Need a class to serve as a tag that we can use to overload New/Delete.
203 +-#define forDbi (*(forDbiWorker *)NULL)
204 +
205 + void * operator new(size_t lenBytes, const forDbiWorker &)
206 + {
207 +diff --git a/coreclr-1.1.1/src/debug/ee/debugger.h b/coreclr-1.1.1/src/debug/ee/debugger.h
208 +index 6368647..59d1e66 100644
209 +--- a/coreclr-1.1.1/src/debug/ee/debugger.h
210 ++++ b/coreclr-1.1.1/src/debug/ee/debugger.h
211 +@@ -3512,10 +3512,10 @@ class DebuggerEval
212 + * ------------------------------------------------------------------------ */
213 +
214 + class InteropSafe {};
215 +-#define interopsafe (*(InteropSafe*)NULL)
216 ++SELECTANY InteropSafe interopsafe;
217 +
218 + class InteropSafeExecutable {};
219 +-#define interopsafeEXEC (*(InteropSafeExecutable*)NULL)
220 ++SELECTANY InteropSafeExecutable interopsafeEXEC;
221 +
222 + #ifndef DACCESS_COMPILE
223 + inline void * __cdecl operator new(size_t n, const InteropSafe&)
224 +diff --git a/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h b/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h
225 +index 055b8ec..54ab11a 100644
226 +--- a/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h
227 ++++ b/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h
228 +@@ -839,7 +839,8 @@ class ArrayStorage
229 + {
230 + // Help mitigate the impact of buffer overflow
231 + // Fail fast with a null-reference AV
232 +- return *(static_cast<T*>(0)) ;
233 ++ volatile char* nullPointer = nullptr;
234 ++ *nullPointer;
235 + }
236 + return m_array[ i ];
237 + }
238 +diff --git a/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h b/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h
239 +index e61e240..24c3e24 100644
240 +--- a/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h
241 ++++ b/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h
242 +@@ -32,7 +32,7 @@
243 + template<class T> void DeleteDbiMemory(T *p);
244 + // Need a class to serve as a tag that we can use to overload New/Delete.
245 + class forDbiWorker {};
246 +-#define forDbi (*(forDbiWorker *)NULL)
247 ++SELECTANY forDbiWorker forDbi;
248 + extern void * operator new(size_t lenBytes, const forDbiWorker &);
249 + extern void * operator new[](size_t lenBytes, const forDbiWorker &);
250 + extern void operator delete(void *p, const forDbiWorker &);
251 +diff --git a/coreclr-1.1.1/src/pal/src/exception/seh.cpp b/coreclr-1.1.1/src/pal/src/exception/seh.cpp
252 +index 473c490..ad09e02 100644
253 +--- a/coreclr-1.1.1/src/pal/src/exception/seh.cpp
254 ++++ b/coreclr-1.1.1/src/pal/src/exception/seh.cpp
255 +@@ -274,7 +274,7 @@ SEHProcessException(PAL_SEHException* exception)
256 + {
257 + // The exception happened in the page right below the stack limit,
258 + // so it is a stack overflow
259 +- write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
260 ++ (void)write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
261 + PROCAbort();
262 + }
263 + }
264 +diff --git a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp
265 +index 4bef170..82061ac 100644
266 +--- a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp
267 ++++ b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp
268 +@@ -277,7 +277,7 @@ DWORD TP_GetFullPathName(LPWSTR fileName, DWORD nBufferLength, LPWSTR lpBuffer)
269 + return GetFullPathNameW(fileName, nBufferLength, lpBuffer, NULL);
270 + #else
271 + char nativeFullPath[MAX_PATH];
272 +- realpath(HackyConvertToSTR(fileName), nativeFullPath);
273 ++ (void)realpath(HackyConvertToSTR(fileName), nativeFullPath);
274 + LPWSTR fullPathForCLR = HackyConvertToWSTR(nativeFullPath);
275 + wcscpy_s(lpBuffer, MAX_PATH, fullPathForCLR);
276 + return wcslen(lpBuffer);
277 +diff --git a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h
278 +index 49e8f88..c196b0c 100644
279 +--- a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h
280 ++++ b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h
281 +@@ -87,7 +87,7 @@ typedef void* HMODULE;
282 + typedef void* ULONG_PTR;
283 + typedef unsigned error_t;
284 + typedef void* LPVOID;
285 +-typedef char BYTE;
286 ++typedef unsigned char BYTE;
287 + typedef WCHAR OLECHAR;
288 + #endif
289 +
290 +diff --git a/coreclr-1.1.1/tests/src/Interop/common/types.h b/coreclr-1.1.1/tests/src/Interop/common/types.h
291 +index 7d7f776..cb59c42 100755
292 +--- a/coreclr-1.1.1/tests/src/Interop/common/types.h
293 ++++ b/coreclr-1.1.1/tests/src/Interop/common/types.h
294 +@@ -28,7 +28,7 @@ typedef void* HMODULE;
295 + typedef void* ULONG_PTR;
296 + typedef unsigned error_t;
297 + typedef void* LPVOID;
298 +-typedef char BYTE;
299 ++typedef unsigned char BYTE;
300 + typedef WCHAR OLECHAR;
301 +
302 + typedef unsigned int UINT_PTR;
303 +@@ -54,4 +54,4 @@ typedef int* DWORD_PTR;
304 + #define FALSE 0
305 + #endif
306 +
307 +-#endif //_INTEROP_TYPES__H
308 +\ No newline at end of file
309 ++#endif //_INTEROP_TYPES__H
310
311 diff --git a/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-exceptionhandling.patch b/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-exceptionhandling.patch
312 new file mode 100644
313 index 0000000..0fd56af
314 --- /dev/null
315 +++ b/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-exceptionhandling.patch
316 @@ -0,0 +1,11 @@
317 +--- a/coreclr-1.1.1/src/vm/exceptionhandling.cpp.orig 2017-04-28 01:48:48.153258383 +0300
318 ++++ a/coreclr-1.1.1/src/vm/exceptionhandling.cpp 2017-04-28 01:50:38.150431673 +0300
319 +@@ -4730,7 +4730,7 @@
320 + }
321 + }
322 +
323 +- throw ex;
324 ++ throw std::move(ex);
325 + }
326 +
327 + #ifdef _AMD64_