public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mikhail Pukhlikov" <cynede@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/dotnet-cli/, dev-dotnet/dotnet-cli/files/
Date: Fri,  2 Jun 2017 08:19:31 +0000 (UTC)	[thread overview]
Message-ID: <1493659397.ee52140d054d1c8b65b864c1357075707891869a.cynede@gentoo> (raw)

commit:     ee52140d054d1c8b65b864c1357075707891869a
Author:     Nexie Kind <nexion.hellborn <AT> gmail <DOT> com>
AuthorDate: Mon May  1 17:23:17 2017 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Mon May  1 17:23:17 2017 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=ee52140d

Compatibility with gcc6 / clang3.9

 dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild   |   4 +
 .../coreclr-1.0.6-clang39-commit-9db7fb1.patch     | 115 +++++++++++++++++++++
 .../files/coreclr-1.0.6-gcc6-clang39.patch         |  26 +++++
 .../coreclr-1.1.1-clang39-commit-9db7fb1.patch     | 115 +++++++++++++++++++++
 .../files/coreclr-1.1.1-exceptionhandling.patch    |  11 ++
 5 files changed, 271 insertions(+)

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
index abcb719..b4bb750 100644
--- a/dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild
+++ b/dev-dotnet/dotnet-cli/dotnet-cli-1.1.1-r1.ebuild
@@ -46,7 +46,11 @@ DEPEND="${RDEPEND}
 	>=sys-devel/gettext-0.19.7"
 
 PATCHES=(
+	"${FILESDIR}/coreclr-${CORECLR_V1_0}-gcc6-clang39.patch"
+	"${FILESDIR}/coreclr-${CORECLR_V1_0}-clang39-commit-9db7fb1.patch"
 	"${FILESDIR}/coreclr-${CORECLR_V1_0}-icu57-commit-352df35.patch"
+	"${FILESDIR}/coreclr-${PV}-clang39-commit-9db7fb1.patch"
+	"${FILESDIR}/coreclr-${PV}-exceptionhandling.patch"
 	"${FILESDIR}/corefx-${PV}-init-tools-script.patch"
 	"${FILESDIR}/corefx-${PV}-run-script.patch"
 )

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
new file mode 100644
index 0000000..5f243bb
--- /dev/null
+++ b/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-clang39-commit-9db7fb1.patch
@@ -0,0 +1,115 @@
+diff --git a/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp b/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp
+index 26e3d6c..59f217c 100644
+--- a/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp
++++ b/coreclr-1.0.6/src/debug/daccess/dacdbiimpl.cpp
+@@ -90,7 +90,6 @@ IDacDbiInterface::IAllocator * g_pAllocator = NULL;
+ //
+ 
+ // Need a class to serve as a tag that we can use to overload New/Delete.
+-#define forDbi (*(forDbiWorker *)NULL)
+ 
+ void * operator new(size_t lenBytes, const forDbiWorker &)
+ {
+diff --git a/coreclr-1.0.6/src/debug/ee/debugger.h b/coreclr-1.0.6/src/debug/ee/debugger.h
+index 6368647..59d1e66 100644
+--- a/coreclr-1.0.6/src/debug/ee/debugger.h
++++ b/coreclr-1.0.6/src/debug/ee/debugger.h
+@@ -3512,10 +3512,10 @@ class DebuggerEval
+  * ------------------------------------------------------------------------ */
+ 
+ class InteropSafe {};
+-#define interopsafe (*(InteropSafe*)NULL)
++SELECTANY InteropSafe interopsafe;
+ 
+ class InteropSafeExecutable {};
+-#define interopsafeEXEC (*(InteropSafeExecutable*)NULL)
++SELECTANY InteropSafeExecutable interopsafeEXEC;
+ 
+ #ifndef DACCESS_COMPILE
+ inline void * __cdecl operator new(size_t n, const InteropSafe&)
+diff --git a/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h b/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h
+index 055b8ec..54ab11a 100644
+--- a/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h
++++ b/coreclr-1.0.6/src/debug/ildbsymlib/symwrite.h
+@@ -839,7 +839,8 @@ class ArrayStorage
+         {
+             // Help mitigate the impact of buffer overflow
+             // Fail fast with a null-reference AV
+-            return *(static_cast<T*>(0)) ;
++            volatile char* nullPointer = nullptr;
++            *nullPointer;
+         }
+         return m_array[ i ];
+     }
+diff --git a/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h b/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h
+index e61e240..24c3e24 100644
+--- a/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h
++++ b/coreclr-1.0.6/src/debug/inc/dacdbiinterface.h
+@@ -32,7 +32,7 @@
+ template<class T> void DeleteDbiMemory(T *p);
+ // Need a class to serve as a tag that we can use to overload New/Delete.
+ class forDbiWorker {};
+-#define forDbi (*(forDbiWorker *)NULL)
++SELECTANY forDbiWorker forDbi;
+ extern void * operator new(size_t lenBytes, const forDbiWorker &);
+ extern void * operator new[](size_t lenBytes, const forDbiWorker &);
+ extern void operator delete(void *p, const forDbiWorker &);
+diff --git a/coreclr-1.0.6/src/pal/src/exception/seh.cpp b/coreclr-1.0.6/src/pal/src/exception/seh.cpp
+index 473c490..ad09e02 100644
+--- a/coreclr-1.0.6/src/pal/src/exception/seh.cpp
++++ b/coreclr-1.0.6/src/pal/src/exception/seh.cpp
+@@ -274,7 +274,7 @@ SEHProcessException(PAL_SEHException* exception)
+                     {
+                         // The exception happened in the page right below the stack limit,
+                         // so it is a stack overflow
+-                        write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
++                        (void)write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
+                         PROCAbort();
+                     }
+                 }
+diff --git a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp
+index 4bef170..82061ac 100644
+--- a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp
++++ b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.cpp
+@@ -277,7 +277,7 @@ DWORD TP_GetFullPathName(LPWSTR fileName, DWORD nBufferLength, LPWSTR lpBuffer)
+ 	return GetFullPathNameW(fileName, nBufferLength, lpBuffer, NULL);
+ #else
+ 	char nativeFullPath[MAX_PATH];
+-	realpath(HackyConvertToSTR(fileName), nativeFullPath);
++	(void)realpath(HackyConvertToSTR(fileName), nativeFullPath);
+ 	LPWSTR fullPathForCLR = HackyConvertToWSTR(nativeFullPath);
+ 	wcscpy_s(lpBuffer, MAX_PATH, fullPathForCLR);
+ 	return wcslen(lpBuffer);
+diff --git a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h
+index 49e8f88..c196b0c 100644
+--- a/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h
++++ b/coreclr-1.0.6/tests/src/Common/Platform/platformdefines.h
+@@ -87,7 +87,7 @@ typedef void* HMODULE;
+ typedef void* ULONG_PTR;
+ typedef unsigned error_t;
+ typedef void* LPVOID;
+-typedef char BYTE;
++typedef unsigned char BYTE;
+ typedef WCHAR OLECHAR;
+ #endif
+ 
+diff --git a/coreclr-1.0.6/tests/src/Interop/common/types.h b/coreclr-1.0.6/tests/src/Interop/common/types.h
+index 7d7f776..cb59c42 100755
+--- a/coreclr-1.0.6/tests/src/Interop/common/types.h
++++ b/coreclr-1.0.6/tests/src/Interop/common/types.h
+@@ -28,7 +28,7 @@ typedef void* HMODULE;
+ typedef void* ULONG_PTR;
+ typedef unsigned error_t;
+ typedef void* LPVOID;
+-typedef char BYTE;
++typedef unsigned char BYTE;
+ typedef WCHAR OLECHAR;
+ 
+ typedef unsigned int UINT_PTR;
+@@ -54,4 +54,4 @@ typedef int*  DWORD_PTR;
+ #define FALSE 0
+ #endif
+ 
+-#endif //_INTEROP_TYPES__H
+\ No newline at end of file
++#endif //_INTEROP_TYPES__H

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
new file mode 100644
index 0000000..d921dc3
--- /dev/null
+++ b/dev-dotnet/dotnet-cli/files/coreclr-1.0.6-gcc6-clang39.patch
@@ -0,0 +1,26 @@
+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
+--- a/coreclr-1.0.6/src/pal/src/include/pal/palinternal.h	2017-04-27 21:06:55.268009100 +0300
++++ b/coreclr-1.0.6/src/pal/src/include/pal/palinternal.h	2017-04-27 21:08:23.705175087 +0300
+@@ -567,6 +567,8 @@ function_name() to call the system's imp
+ #endif
+ #include <ctype.h>
+ 
++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1
++
+ #define _WITH_GETLINE
+ #include <stdio.h>
+ #include <stdlib.h>
+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
+--- a/coreclr-1.0.6/src/pal/src/include/pal/sharedmemory.h	2017-04-27 21:06:55.268009100 +0300
++++ b/coreclr-1.0.6/src/pal/src/include/pal/sharedmemory.h	2017-04-27 21:07:44.351101225 +0300
+@@ -182,6 +182,10 @@ public:
+     virtual void Close(bool isAbruptShutdown, bool releaseSharedData)
+     {
+     }
++
++	virtual ~SharedMemoryProcessDataBase()
++	{
++	}
+ };
+ 
+ class SharedMemoryProcessDataHeader

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
new file mode 100644
index 0000000..9c95b85
--- /dev/null
+++ b/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-clang39-commit-9db7fb1.patch
@@ -0,0 +1,115 @@
+diff --git a/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp b/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp
+index 26e3d6c..59f217c 100644
+--- a/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp
++++ b/coreclr-1.1.1/src/debug/daccess/dacdbiimpl.cpp
+@@ -90,7 +90,6 @@ IDacDbiInterface::IAllocator * g_pAllocator = NULL;
+ //
+ 
+ // Need a class to serve as a tag that we can use to overload New/Delete.
+-#define forDbi (*(forDbiWorker *)NULL)
+ 
+ void * operator new(size_t lenBytes, const forDbiWorker &)
+ {
+diff --git a/coreclr-1.1.1/src/debug/ee/debugger.h b/coreclr-1.1.1/src/debug/ee/debugger.h
+index 6368647..59d1e66 100644
+--- a/coreclr-1.1.1/src/debug/ee/debugger.h
++++ b/coreclr-1.1.1/src/debug/ee/debugger.h
+@@ -3512,10 +3512,10 @@ class DebuggerEval
+  * ------------------------------------------------------------------------ */
+ 
+ class InteropSafe {};
+-#define interopsafe (*(InteropSafe*)NULL)
++SELECTANY InteropSafe interopsafe;
+ 
+ class InteropSafeExecutable {};
+-#define interopsafeEXEC (*(InteropSafeExecutable*)NULL)
++SELECTANY InteropSafeExecutable interopsafeEXEC;
+ 
+ #ifndef DACCESS_COMPILE
+ inline void * __cdecl operator new(size_t n, const InteropSafe&)
+diff --git a/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h b/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h
+index 055b8ec..54ab11a 100644
+--- a/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h
++++ b/coreclr-1.1.1/src/debug/ildbsymlib/symwrite.h
+@@ -839,7 +839,8 @@ class ArrayStorage
+         {
+             // Help mitigate the impact of buffer overflow
+             // Fail fast with a null-reference AV
+-            return *(static_cast<T*>(0)) ;
++            volatile char* nullPointer = nullptr;
++            *nullPointer;
+         }
+         return m_array[ i ];
+     }
+diff --git a/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h b/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h
+index e61e240..24c3e24 100644
+--- a/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h
++++ b/coreclr-1.1.1/src/debug/inc/dacdbiinterface.h
+@@ -32,7 +32,7 @@
+ template<class T> void DeleteDbiMemory(T *p);
+ // Need a class to serve as a tag that we can use to overload New/Delete.
+ class forDbiWorker {};
+-#define forDbi (*(forDbiWorker *)NULL)
++SELECTANY forDbiWorker forDbi;
+ extern void * operator new(size_t lenBytes, const forDbiWorker &);
+ extern void * operator new[](size_t lenBytes, const forDbiWorker &);
+ extern void operator delete(void *p, const forDbiWorker &);
+diff --git a/coreclr-1.1.1/src/pal/src/exception/seh.cpp b/coreclr-1.1.1/src/pal/src/exception/seh.cpp
+index 473c490..ad09e02 100644
+--- a/coreclr-1.1.1/src/pal/src/exception/seh.cpp
++++ b/coreclr-1.1.1/src/pal/src/exception/seh.cpp
+@@ -274,7 +274,7 @@ SEHProcessException(PAL_SEHException* exception)
+                     {
+                         // The exception happened in the page right below the stack limit,
+                         // so it is a stack overflow
+-                        write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
++                        (void)write(STDERR_FILENO, StackOverflowMessage, sizeof(StackOverflowMessage) - 1);
+                         PROCAbort();
+                     }
+                 }
+diff --git a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp
+index 4bef170..82061ac 100644
+--- a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp
++++ b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.cpp
+@@ -277,7 +277,7 @@ DWORD TP_GetFullPathName(LPWSTR fileName, DWORD nBufferLength, LPWSTR lpBuffer)
+ 	return GetFullPathNameW(fileName, nBufferLength, lpBuffer, NULL);
+ #else
+ 	char nativeFullPath[MAX_PATH];
+-	realpath(HackyConvertToSTR(fileName), nativeFullPath);
++	(void)realpath(HackyConvertToSTR(fileName), nativeFullPath);
+ 	LPWSTR fullPathForCLR = HackyConvertToWSTR(nativeFullPath);
+ 	wcscpy_s(lpBuffer, MAX_PATH, fullPathForCLR);
+ 	return wcslen(lpBuffer);
+diff --git a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h
+index 49e8f88..c196b0c 100644
+--- a/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h
++++ b/coreclr-1.1.1/tests/src/Common/Platform/platformdefines.h
+@@ -87,7 +87,7 @@ typedef void* HMODULE;
+ typedef void* ULONG_PTR;
+ typedef unsigned error_t;
+ typedef void* LPVOID;
+-typedef char BYTE;
++typedef unsigned char BYTE;
+ typedef WCHAR OLECHAR;
+ #endif
+ 
+diff --git a/coreclr-1.1.1/tests/src/Interop/common/types.h b/coreclr-1.1.1/tests/src/Interop/common/types.h
+index 7d7f776..cb59c42 100755
+--- a/coreclr-1.1.1/tests/src/Interop/common/types.h
++++ b/coreclr-1.1.1/tests/src/Interop/common/types.h
+@@ -28,7 +28,7 @@ typedef void* HMODULE;
+ typedef void* ULONG_PTR;
+ typedef unsigned error_t;
+ typedef void* LPVOID;
+-typedef char BYTE;
++typedef unsigned char BYTE;
+ typedef WCHAR OLECHAR;
+ 
+ typedef unsigned int UINT_PTR;
+@@ -54,4 +54,4 @@ typedef int*  DWORD_PTR;
+ #define FALSE 0
+ #endif
+ 
+-#endif //_INTEROP_TYPES__H
+\ No newline at end of file
++#endif //_INTEROP_TYPES__H

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
new file mode 100644
index 0000000..0fd56af
--- /dev/null
+++ b/dev-dotnet/dotnet-cli/files/coreclr-1.1.1-exceptionhandling.patch
@@ -0,0 +1,11 @@
+--- a/coreclr-1.1.1/src/vm/exceptionhandling.cpp.orig	2017-04-28 01:48:48.153258383 +0300
++++ a/coreclr-1.1.1/src/vm/exceptionhandling.cpp	2017-04-28 01:50:38.150431673 +0300
+@@ -4730,7 +4730,7 @@
+         }
+     }
+ 
+-    throw ex;
++    throw std::move(ex);
+ }
+ 
+ #ifdef _AMD64_


             reply	other threads:[~2017-06-02  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  8:19 Mikhail Pukhlikov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-07-04 13:18 [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/dotnet-cli/, dev-dotnet/dotnet-cli/files/ Mikhail Pukhlikov
2016-09-19 13:16 Mikhail Pukhlikov
2016-07-14  6:29 Heather Cynede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493659397.ee52140d054d1c8b65b864c1357075707891869a.cynede@gentoo \
    --to=cynede@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox