summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Brodersen2016-11-27 16:39:54 -0600
committerAaron Brodersen2016-11-27 16:39:54 -0600
commita363e780fd7797ac7258cbca53517de9199ce8b9 (patch)
tree6e43c42dbda58dbf410ed5bee07d5d26a6d8da2f
parent78732606b46eeb8006c51148b44a396732856d77 (diff)
downloadaur-a363e780fd7797ac7258cbca53517de9199ce8b9.tar.gz
update to 1.0.0_preview2_003177
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD61
-rw-r--r--gcc6-github-pull-5304.patch28
-rw-r--r--glibc-readdir-corefx.patch247
-rw-r--r--llvm-39-github-pull-8311.patch180
-rw-r--r--llvm-39-move.patch28
-rw-r--r--segv-github-pull-6027.patch59
-rw-r--r--unused-attr-coreclr.patch40
-rw-r--r--unused-attr-corefx.patch26
9 files changed, 229 insertions, 466 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3136da264eb4..81b8fb085d7f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dotnet-cli
pkgdesc = A command line utility for building, testing, packaging and running .NET Core applications and libraries
- pkgver = 1.0.0_preview2_003131
+ pkgver = 1.0.0_preview2_1_003177
pkgrel = 1
url = https://www.microsoft.com/net/core
arch = x86_64
@@ -17,22 +17,16 @@ pkgbase = dotnet-cli
depends = openssl
depends = curl
provides = dotnet
- noextract = dotnet-cli-1.0.0_preview2_003131.tar.gz
+ noextract = dotnet-cli-1.0.0_preview2_1_003177.tar.gz
options = staticlibs
- source = coreclr-1.0.4.tar.gz::https://github.com/dotnet/coreclr/archive/v1.0.4.tar.gz
- source = corefx-1.0.0.tar.gz::https://github.com/dotnet/corefx/archive/v1.0.0.tar.gz
- source = dotnet-cli-1.0.0_preview2_003131.tar.gz::https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/1.0.0-preview2-003131/dotnet-dev-fedora.23-x64.1.0.0-preview2-003131.tar.gz
- source = gcc6-github-pull-5304.patch
- source = unused-attr-coreclr.patch
- source = unused-attr-corefx.patch
- source = glibc-readdir-corefx.patch
- sha256sums = b49ba545fe632dfd5426669ca3300009a5ffd1ccf3c1cf82303dcf44044db33d
- sha256sums = 98f9475ea42e5d55ad9402424e342a6c0ea7351f3fb5805a602132969b44b774
- sha256sums = 8cd233fdf2d12eca47d558e70e90000aee34a75c718fc9f22d8680e6cb688047
- sha256sums = 0905f9f8e6e33a7a6e5f4acf9ec54ec3796400dce28f0d71c1d1d8bcd9b7e068
- sha256sums = 8a33c449312f90660d431177f7ee0a36894b75749f79ecf8995c64d82197af90
- sha256sums = 9ecdd0ca615b988b67cc4c6a9f5035fb3fb70b16d9281d07c17a28a784a6d4ab
- sha256sums = 210cc1c802f2fd284ebfa6bbf7f7997c616adb5959725b25028a2ca63a568f51
+ source = coreclr-1.1.0.tar.gz::https://github.com/dotnet/coreclr/archive/v1.1.0.tar.gz
+ source = dotnet-cli-1.0.0_preview2_1_003177.tar.gz::https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/1.0.0-preview2-1-003177/dotnet-dev-fedora.23-x64.1.0.0-preview2-1-003177.tar.gz
+ source = llvm-39-github-pull-8311.patch
+ source = llvm-39-move.patch
+ sha256sums = edc1e416f07a71e2b3f70c1f1412e45a7396b3f0daac5bcb267d5f779b9d7444
+ sha256sums = 9802a59b2e68c1fd2c91648503302066bf0ab09b1d286dd6264e2ccc75f50b09
+ sha256sums = 581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7
+ sha256sums = 84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d
pkgname = dotnet-cli
diff --git a/PKGBUILD b/PKGBUILD
index 952734cba25f..42cc7d571d5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Aaron Brodersen <aaron at abrodersen dot com>
pkgname=dotnet-cli
-pkgver="1.0.0_preview2_003131"
+pkgver="1.0.0_preview2_1_003177"
pkgrel=1
pkgdesc="A command line utility for building, testing, packaging and running .NET Core applications and libraries"
arch=(x86_64)
@@ -16,71 +16,38 @@ backup=()
options=(staticlibs)
install=
-_coreclrver="1.0.4"
-_corefxver="1.0.0"
-_runtimever="1.0.1"
+_coreclrver="1.1.0"
+_runtimever="1.1.0"
_sdkver=${pkgver//_/-}
_coreclr="coreclr-${_coreclrver}"
-_corefx="corefx-${_corefxver}"
source=(
"${_coreclr}.tar.gz::https://github.com/dotnet/coreclr/archive/v${_coreclrver}.tar.gz"
- "${_corefx}.tar.gz::https://github.com/dotnet/corefx/archive/v${_corefxver}.tar.gz"
"${pkgname}-${pkgver}.tar.gz::https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/${_sdkver}/dotnet-dev-fedora.23-x64.${_sdkver}.tar.gz"
- 'gcc6-github-pull-5304.patch'
- 'unused-attr-coreclr.patch'
- 'unused-attr-corefx.patch'
- 'glibc-readdir-corefx.patch')
+ 'llvm-39-github-pull-8311.patch'
+ 'llvm-39-move.patch')
noextract=("${pkgname}-${pkgver}.tar.gz")
-sha256sums=('b49ba545fe632dfd5426669ca3300009a5ffd1ccf3c1cf82303dcf44044db33d'
- '98f9475ea42e5d55ad9402424e342a6c0ea7351f3fb5805a602132969b44b774'
- '8cd233fdf2d12eca47d558e70e90000aee34a75c718fc9f22d8680e6cb688047'
- '0905f9f8e6e33a7a6e5f4acf9ec54ec3796400dce28f0d71c1d1d8bcd9b7e068'
- '8a33c449312f90660d431177f7ee0a36894b75749f79ecf8995c64d82197af90'
- '9ecdd0ca615b988b67cc4c6a9f5035fb3fb70b16d9281d07c17a28a784a6d4ab'
- '210cc1c802f2fd284ebfa6bbf7f7997c616adb5959725b25028a2ca63a568f51')
+sha256sums=('edc1e416f07a71e2b3f70c1f1412e45a7396b3f0daac5bcb267d5f779b9d7444'
+ '9802a59b2e68c1fd2c91648503302066bf0ab09b1d286dd6264e2ccc75f50b09'
+ '581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7'
+ '84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d')
prepare() {
cd "${srcdir}/${_coreclr}"
- patch -p1 < "${srcdir}/gcc6-github-pull-5304.patch"
- patch -p1 < "${srcdir}/unused-attr-coreclr.patch"
-
- cd "${srcdir}/${_corefx}"
- patch -p1 < "${srcdir}/unused-attr-corefx.patch"
- patch -p1 < "${srcdir}/glibc-readdir-corefx.patch"
+ patch -p1 < "${srcdir}/llvm-39-github-pull-8311.patch"
+ patch -p1 < "${srcdir}/llvm-39-move.patch"
}
build() {
cd "${srcdir}/${_coreclr}"
./build.sh x64 release
-
- cd "${srcdir}/${_corefx}"
- ./build.sh native x64 release
-
}
_coreclr_files=(
- 'libclrjit.so'
- 'libcoreclr.so'
- 'libcoreclrtraceptprovider.so'
- 'libdbgshim.so'
- 'libmscordaccore.so'
- 'libmscordbi.so'
- 'libsos.so'
- 'libsosplugin.so'
'System.Globalization.Native.so'
)
-_corefx_files=(
- 'System.IO.Compression.Native.so'
- 'System.Native.a'
- 'System.Native.so'
- 'System.Net.Http.Native.so'
- 'System.Net.Security.Native.so'
- 'System.Security.Cryptography.Native.so'
-)
-
_copy_file() {
cp --force --preserve=mode $1 "$2/shared/Microsoft.NETCore.App/${_runtimever}/"
}
@@ -97,12 +64,6 @@ package() {
_copy_file "${_clrdir}/bin/Product/Linux.x64.Release/${file}" "${_outdir}"
done
- local _fxdir="${srcdir}/${_corefx}"
-
- for file in "${_corefx_files[@]}"; do
- _copy_file "${_fxdir}/bin/Linux.x64.Release/Native/${file}" "${_outdir}"
- done
-
mkdir -p "${pkgdir}/usr/bin/"
ln -s "/opt/dotnet/dotnet" "${pkgdir}/usr/bin/dotnet"
chown -R 0:0 "${_outdir}"
diff --git a/gcc6-github-pull-5304.patch b/gcc6-github-pull-5304.patch
deleted file mode 100644
index 012303fa7152..000000000000
--- a/gcc6-github-pull-5304.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 41912e3adb789b62f4cb46acffe915b6f1ab0e1e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=BCrgen=20H=C3=B6tzel?= <juergen@hoetzel.info>
-Date: Mon, 30 May 2016 11:45:49 +0200
-Subject: [PATCH] Don't use libstdc++ wrappers for stdlib.h (#5304)
-
-This prevents #undef of min/max macros. Refs #5006.
----
- src/pal/src/include/pal/palinternal.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/pal/src/include/pal/palinternal.h b/src/pal/src/include/pal/palinternal.h
-index 4c01be8..fdebc8d 100644
---- a/src/pal/src/include/pal/palinternal.h
-+++ b/src/pal/src/include/pal/palinternal.h
-@@ -567,6 +567,10 @@ function_name() to call the system's implementation
- #endif
- #include <ctype.h>
-
-+// Don't use C++ wrappers for stdlib.h
-+// https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
-+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1
-+
- #define _WITH_GETLINE
- #include <stdio.h>
- #include <stdlib.h>
---
-2.9.0
-
diff --git a/glibc-readdir-corefx.patch b/glibc-readdir-corefx.patch
deleted file mode 100644
index baabf4846525..000000000000
--- a/glibc-readdir-corefx.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From 335b1f8553107a73077ae0a2dcf094911d390ece Mon Sep 17 00:00:00 2001
-From: "R. Fontenot" <nfontenot27@gmail.com>
-Date: Sun, 14 Aug 2016 23:56:00 -0500
-Subject: [PATCH 1/5] Replace readdir_r() with readdir()
-
-readdir_r() is deprecated in glibc >= v2.24
----
- src/Native/System.Native/pal_io.cpp | 19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/src/Native/System.Native/pal_io.cpp b/src/Native/System.Native/pal_io.cpp
-index 7da1bff..9bd0ec8 100644
---- a/src/Native/System.Native/pal_io.cpp
-+++ b/src/Native/System.Native/pal_io.cpp
-@@ -339,27 +339,28 @@ extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferS
- return ERANGE;
- }
-
-- dirent* result = nullptr;
-- dirent* entry = static_cast<dirent*>(buffer);
-- int error = readdir_r(dir, entry, &result);
-+ // readdir returns a pointer to memory that may be staticly allocated
-+ // by glibc. Data returned by readdir may be overwritten by other readdir
-+ // calls for the same directory stream.
-+ errno = 0;
-+ dirent* entry = readdir(dir);
-
- // positive error number returned -> failure
-- if (error != 0)
-+ if (errno != 0)
- {
-- assert(error > 0);
-+ assert(error == EBADF); // Invalid directory stream discriptor dir.
- *outputEntry = {}; // managed out param must be initialized
-- return error;
-+ return errno;
- }
-
- // 0 returned with null result -> end-of-stream
-- if (result == nullptr)
-+ if (entry == nullptr)
- {
- *outputEntry = {}; // managed out param must be initialized
- return -1; // shim convention for end-of-stream
- }
-
-- // 0 returned with non-null result (guaranteed to be set to entry arg) -> success
-- assert(result == entry);
-+ memcpy(buffer,entry,static_cast<size_t>(bufferSize));
- ConvertDirent(*entry, outputEntry);
- return 0;
- }
---
-2.9.2
-
-From a74fa9876a8479e206a3357c481ffbe574b9fa9c Mon Sep 17 00:00:00 2001
-From: "R. Fontenot" <nfontenot27@gmail.com>
-Date: Mon, 15 Aug 2016 10:42:54 -0500
-Subject: [PATCH 2/5] Clean up discrepancies in the documentation.
-
----
- src/Native/System.Native/pal_io.cpp | 17 ++++++++++-------
- 1 file changed, 10 insertions(+), 7 deletions(-)
-
-diff --git a/src/Native/System.Native/pal_io.cpp b/src/Native/System.Native/pal_io.cpp
-index 9bd0ec8..6977f0d 100644
---- a/src/Native/System.Native/pal_io.cpp
-+++ b/src/Native/System.Native/pal_io.cpp
-@@ -321,12 +321,15 @@ extern "C" int32_t SystemNative_GetDirentSize()
- // size of the dirent struct.
- // 2) The managed code creates a byte[] buffer of the size of the native dirent
- // and passes a pointer to this buffer to this function.
--// 3) This function passes input byte[] buffer to the OS to fill with dirent data
--// which makes the 1st strcpy.
--// 4) The ConvertDirent function will set a pointer to the start of the inode name
--// in the byte[] buffer so the managed code and find it and copy it out of the
-+// 3) This function gets a pointer to the possibly staticly allocated directory entry.
-+// 4) Then, byte[] entry is copied into the byte[] buffer for bufferSize bytes.
-+// This makes the 1st strcpy.
-+// 5) The ConvertDirent function will set a pointer to the start of the inode name
-+// in the byte[] buffer so the managed code can find it and copy it out of the
- // buffer into a managed string that the caller of the framework can use, making
- // the 2nd and final strcpy.
-+//
-+// To make this function thread safe ensure calls on the same DIR* dir never happen concurrently.
- extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferSize, DirectoryEntry* outputEntry)
- {
- assert(buffer != nullptr);
-@@ -339,10 +342,10 @@ extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferS
- return ERANGE;
- }
-
-- // readdir returns a pointer to memory that may be staticly allocated
-- // by glibc. Data returned by readdir may be overwritten by other readdir
-- // calls for the same directory stream.
- errno = 0;
-+ // returns a pointer to memory that may be staticly allocated by glibc.
-+ // Data returned by readdir may be overwritten by other readdir calls
-+ // on the same directory stream.
- dirent* entry = readdir(dir);
-
- // positive error number returned -> failure
---
-2.9.2
-
-From 53f6a769d1a1269b4936cbd4dc7b359d48729ed7 Mon Sep 17 00:00:00 2001
-From: "R. Fontenot" <nfontenot27@gmail.com>
-Date: Tue, 16 Aug 2016 09:36:08 -0500
-Subject: [PATCH 3/5] Add readdir_r cxx_check_source_compiles
-
----
- src/Native/configure.cmake | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/src/Native/configure.cmake b/src/Native/configure.cmake
-index 017d75f..abc0360 100644
---- a/src/Native/configure.cmake
-+++ b/src/Native/configure.cmake
-@@ -174,6 +174,20 @@ check_cxx_source_compiles(
-
- check_cxx_source_compiles(
- "
-+ #include <dirent.h>
-+ int main(void)
-+ {
-+ DIR* dir;
-+ struct dirent* entry;
-+ struct dirent* result;
-+ readdir_r(dir,entry,&result);
-+ return 0;
-+ }
-+ "
-+ HAVE_GNU_READDIR_R)
-+
-+check_cxx_source_compiles(
-+ "
- #include <sys/types.h>
- #include <sys/event.h>
- int main(void)
---
-2.9.2
-
-From ed8510abf9cebb4d0d5d00c28bfb355768bb0c9b Mon Sep 17 00:00:00 2001
-From: "R. Fontenot" <nfontenot27@gmail.com>
-Date: Tue, 16 Aug 2016 09:54:38 -0500
-Subject: [PATCH 4/5] Add copy of SystemNative_ReadDirR() from master
-
----
- src/Native/System.Native/pal_io.cpp | 51 ++++++++++++++++++++++++++++++++
- 1 file changed, 51 insertions(+)
-
-diff --git a/src/Native/System.Native/pal_io.cpp b/src/Native/System.Native/pal_io.cpp
-index 6977f0d..b7908b5 100644
---- a/src/Native/System.Native/pal_io.cpp
-+++ b/src/Native/System.Native/pal_io.cpp
-@@ -316,6 +316,56 @@ extern "C" int32_t SystemNative_GetDirentSize()
- return sizeof(dirent);
- }
-
-+#if defined HAVE_GNU_READDIR_R
-+// To reduce the number of string copies, this function calling pattern works as follows:
-+// 1) The managed code calls GetDirentSize() to get the platform-specific
-+// size of the dirent struct.
-+// 2) The managed code creates a byte[] buffer of the size of the native dirent
-+// and passes a pointer to this buffer to this function.
-+// 3) This function passes input byte[] buffer to the OS to fill with dirent data
-+// which makes the 1st strcpy.
-+// 4) The ConvertDirent function will set a pointer to the start of the inode name
-+// in the byte[] buffer so the managed code and find it and copy it out of the
-+// buffer into a managed string that the caller of the framework can use, making
-+// the 2nd and final strcpy.
-+extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferSize, DirectoryEntry* outputEntry)
-+{
-+ assert(buffer != nullptr);
-+ assert(dir != nullptr);
-+ assert(outputEntry != nullptr);
-+
-+ if (bufferSize < static_cast<int32_t>(sizeof(dirent)))
-+ {
-+ assert(false && "Buffer size too small; use GetDirentSize to get required buffer size");
-+ return ERANGE;
-+ }
-+
-+ dirent* result = nullptr;
-+ dirent* entry = static_cast<dirent*>(buffer);
-+ int error = readdir_r(dir, entry, &result);
-+
-+ // positive error number returned -> failure
-+ if (error != 0)
-+ {
-+ assert(error > 0);
-+ *outputEntry = {}; // managed out param must be initialized
-+ return error;
-+ }
-+
-+ // 0 returned with null result -> end-of-stream
-+ if (result == nullptr)
-+ {
-+ *outputEntry = {}; // managed out param must be initialized
-+ return -1; // shim convention for end-of-stream
-+ }
-+
-+ // 0 returned with non-null result (guaranteed to be set to entry arg) -> success
-+ assert(result == entry);
-+ ConvertDirent(*entry, outputEntry);
-+ return 0;
-+}
-+
-+#else
- // To reduce the number of string copies, this function calling pattern works as follows:
- // 1) The managed code calls GetDirentSize() to get the platform-specific
- // size of the dirent struct.
-@@ -367,6 +417,7 @@ extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferS
- ConvertDirent(*entry, outputEntry);
- return 0;
- }
-+#endif
-
- extern "C" DIR* SystemNative_OpenDir(const char* path)
- {
---
-2.9.2
-
-From 59bd06622e1d0894954ce7e625ccf019953831e8 Mon Sep 17 00:00:00 2001
-From: "R. Fontenot" <nfontenot27@gmail.com>
-Date: Tue, 16 Aug 2016 09:56:47 -0500
-Subject: [PATCH 5/5] Fix assert
-
----
- src/Native/System.Native/pal_io.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Native/System.Native/pal_io.cpp b/src/Native/System.Native/pal_io.cpp
-index b7908b5..e5e7a4f 100644
---- a/src/Native/System.Native/pal_io.cpp
-+++ b/src/Native/System.Native/pal_io.cpp
-@@ -401,7 +401,7 @@ extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferS
- // positive error number returned -> failure
- if (errno != 0)
- {
-- assert(error == EBADF); // Invalid directory stream discriptor dir.
-+ assert(errno == EBADF); // Invalid directory stream discriptor dir.
- *outputEntry = {}; // managed out param must be initialized
- return errno;
- }
---
-2.9.2
diff --git a/llvm-39-github-pull-8311.patch b/llvm-39-github-pull-8311.patch
new file mode 100644
index 000000000000..21b8374050a3
--- /dev/null
+++ b/llvm-39-github-pull-8311.patch
@@ -0,0 +1,180 @@
+From 9f4bf341ad236df7d16bbdba0c4111393ea141d2 Mon Sep 17 00:00:00 2001
+From: Jan Vorlicek <janvorli@microsoft.com>
+Date: Sun, 27 Nov 2016 05:34:03 +0100
+Subject: [PATCH] Fix building CoreCLR with Clang 3.9 (#8311)
+
+There were few constructs that Clang 3.9 didn't like due to its strict
+C++ standard conformance rules.
+---
+ src/debug/daccess/dacdbiimpl.cpp | 2 +-
+ src/debug/di/rsmain.cpp | 2 ++
+ src/debug/di/rspriv.h | 2 +-
+ src/debug/ee/debugger.cpp | 3 +++
+ src/debug/ee/debugger.h | 4 ++--
+ src/debug/ildbsymlib/symwrite.h | 3 ++-
+ src/debug/inc/dacdbiinterface.h | 2 +-
+ src/pal/src/exception/seh.cpp | 2 +-
+ tests/src/Common/Platform/platformdefines.cpp | 2 +-
+ tests/src/Common/Platform/platformdefines.h | 2 +-
+ tests/src/Interop/common/types.h | 4 ++--
+ 11 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp
+index 26e3d6c..ae266e8 100644
+--- a/src/debug/daccess/dacdbiimpl.cpp
++++ b/src/debug/daccess/dacdbiimpl.cpp
+@@ -90,7 +90,7 @@ 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)
++forDbiWorker forDbi;
+
+ void * operator new(size_t lenBytes, const forDbiWorker &)
+ {
+diff --git a/src/debug/di/rsmain.cpp b/src/debug/di/rsmain.cpp
+index b568575..0f57787 100644
+--- a/src/debug/di/rsmain.cpp
++++ b/src/debug/di/rsmain.cpp
+@@ -40,6 +40,8 @@
+ RSDebuggingInfo g_RSDebuggingInfo_OutOfProc = {0 }; // set to NULL
+ RSDebuggingInfo * g_pRSDebuggingInfo = &g_RSDebuggingInfo_OutOfProc;
+
++// The following instances are used for invoking overloaded new/delete
++forDbiWorker forDbi;
+
+ #ifdef _DEBUG
+ // For logs, we can print the string name for the debug codes.
+diff --git a/src/debug/di/rspriv.h b/src/debug/di/rspriv.h
+index bc0ea59..18920ad 100644
+--- a/src/debug/di/rspriv.h
++++ b/src/debug/di/rspriv.h
+@@ -177,7 +177,7 @@ private:
+ USHORT m_usPort;
+ };
+
+-#define forDbi (*(forDbiWorker *)NULL)
++extern forDbiWorker forDbi;
+
+ // for dbi we just default to new, but we need to have these defined for both dac and dbi
+ inline void * operator new(size_t lenBytes, const forDbiWorker &)
+diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp
+index a06811c..d67cb41 100644
+--- a/src/debug/ee/debugger.cpp
++++ b/src/debug/ee/debugger.cpp
+@@ -75,6 +75,9 @@ SVAL_IMPL_INIT(BOOL, Debugger, s_fCanChangeNgenFlags, TRUE);
+
+ bool g_EnableSIS = false;
+
++// The following instances are used for invoking overloaded new/delete
++InteropSafe interopsafe;
++InteropSafeExecutable interopsafeEXEC;
+
+ #ifndef DACCESS_COMPILE
+
+diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h
+index 6368647..9cdf546 100644
+--- a/src/debug/ee/debugger.h
++++ b/src/debug/ee/debugger.h
+@@ -3512,10 +3512,10 @@ public:
+ * ------------------------------------------------------------------------ */
+
+ class InteropSafe {};
+-#define interopsafe (*(InteropSafe*)NULL)
++extern InteropSafe interopsafe;
+
+ class InteropSafeExecutable {};
+-#define interopsafeEXEC (*(InteropSafeExecutable*)NULL)
++extern InteropSafeExecutable interopsafeEXEC;
+
+ #ifndef DACCESS_COMPILE
+ inline void * __cdecl operator new(size_t n, const InteropSafe&)
+diff --git a/src/debug/ildbsymlib/symwrite.h b/src/debug/ildbsymlib/symwrite.h
+index 055b8ec..54ab11a 100644
+--- a/src/debug/ildbsymlib/symwrite.h
++++ b/src/debug/ildbsymlib/symwrite.h
+@@ -839,7 +839,8 @@ public:
+ {
+ // 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/src/debug/inc/dacdbiinterface.h b/src/debug/inc/dacdbiinterface.h
+index e61e240..569ccba 100644
+--- a/src/debug/inc/dacdbiinterface.h
++++ b/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)
++extern 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/src/pal/src/exception/seh.cpp b/src/pal/src/exception/seh.cpp
+index 473c490..ad09e02 100644
+--- a/src/pal/src/exception/seh.cpp
++++ b/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/tests/src/Common/Platform/platformdefines.cpp b/tests/src/Common/Platform/platformdefines.cpp
+index 4bef170..82061ac 100644
+--- a/tests/src/Common/Platform/platformdefines.cpp
++++ b/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/tests/src/Common/Platform/platformdefines.h b/tests/src/Common/Platform/platformdefines.h
+index 49e8f88..c196b0c 100644
+--- a/tests/src/Common/Platform/platformdefines.h
++++ b/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/tests/src/Interop/common/types.h b/tests/src/Interop/common/types.h
+index 7d7f776..cb59c42 100755
+--- a/tests/src/Interop/common/types.h
++++ b/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
+--
+2.10.2
+
diff --git a/llvm-39-move.patch b/llvm-39-move.patch
new file mode 100644
index 000000000000..2c02d41c3f28
--- /dev/null
+++ b/llvm-39-move.patch
@@ -0,0 +1,28 @@
+From 7dfb2ed8614dea8c2fe757592436a38694e91ebc Mon Sep 17 00:00:00 2001
+From: Jan Vorlicek <janvorli@microsoft.com>
+Date: Fri, 28 Oct 2016 04:34:42 +0200
+Subject: [PATCH] Add missing std::move to one exception throw (#7865)
+
+We had the std::move missing in one of the exception throws. For some reason,
+the current clang didn't complain about it even though the copy constructor was
+deleted.
+---
+ src/vm/exceptionhandling.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
+index e59f10e..ed155eb 100644
+--- a/src/vm/exceptionhandling.cpp
++++ b/src/vm/exceptionhandling.cpp
+@@ -4730,7 +4730,7 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar
+ }
+ }
+
+- throw ex;
++ throw std::move(ex);
+ }
+
+ #ifdef _AMD64_
+--
+2.10.2
+
diff --git a/segv-github-pull-6027.patch b/segv-github-pull-6027.patch
deleted file mode 100644
index 698151b3757a..000000000000
--- a/segv-github-pull-6027.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 56ab756b0e9afef24cf9151a4a43f23e8d78de29 Mon Sep 17 00:00:00 2001
-From: Jan Vorlicek <janvorli@microsoft.com>
-Date: Tue, 28 Jun 2016 21:34:04 +0200
-Subject: [PATCH] Fix Windows context to Unix context translation on AMD64
- (#6027)
-
-There was a bug in the context translation between the Windows context
-and Unix context on AMD64 caused by the fact that the Unix context
-gregs array contains CS, GS and FS in a single field (REG_CSGSFS) and
-the MCREG_SegCs accessor macro was incorrectly written to use the
-whole field as CS. So writing the CS into the Unix context also
-cleared the GS, FS and the topmost 16 bits described as padding.
-This issue was exposed on the Linux kernel >= 4.6.0 where the padding
-for some reason was not zero, probably used by the kernel for some
-internal purposes.
-I have fixed it by changing the accessor to modify only the 16 bits
-corresponding to the CS.
-I have also changed the code in the inject_activation_handler to
-save cycles and not to copy the Windows context back to the Unix one
-in case the activation function was not called and so the context
-was not possibly changed.
----
- src/pal/src/exception/signal.cpp | 5 ++---
- src/pal/src/include/pal/context.h | 2 +-
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/src/pal/src/exception/signal.cpp b/src/pal/src/exception/signal.cpp
-index dc26ee4..adeada1 100644
---- a/src/pal/src/exception/signal.cpp
-+++ b/src/pal/src/exception/signal.cpp
-@@ -464,10 +464,9 @@ static void inject_activation_handler(int code, siginfo_t *siginfo, void *contex
- if (g_safeActivationCheckFunction(CONTEXTGetPC(&winContext), /* checkingCurrentThread */ TRUE))
- {
- g_activationFunction(&winContext);
-+ // Activation function may have modified the context, so update it.
-+ CONTEXTToNativeContext(&winContext, ucontext);
- }
--
-- // Activation function may have modified the context, so update it.
-- CONTEXTToNativeContext(&winContext, ucontext);
- }
- else if (g_previous_activation.sa_sigaction != NULL)
- {
-diff --git a/src/pal/src/include/pal/context.h b/src/pal/src/include/pal/context.h
-index 7591703..6f1b3fe 100644
---- a/src/pal/src/include/pal/context.h
-+++ b/src/pal/src/include/pal/context.h
-@@ -111,7 +111,7 @@ typedef ucontext_t native_context_t;
- #define MCREG_Rax(mc) ((mc).gregs[REG_RAX])
- #define MCREG_Rip(mc) ((mc).gregs[REG_RIP])
- #define MCREG_Rsp(mc) ((mc).gregs[REG_RSP])
--#define MCREG_SegCs(mc) ((mc).gregs[REG_CSGSFS])
-+#define MCREG_SegCs(mc) (*(WORD*)&((mc).gregs[REG_CSGSFS]))
- #define MCREG_R8(mc) ((mc).gregs[REG_R8])
- #define MCREG_R9(mc) ((mc).gregs[REG_R9])
- #define MCREG_R10(mc) ((mc).gregs[REG_R10])
---
-2.9.0
-
diff --git a/unused-attr-coreclr.patch b/unused-attr-coreclr.patch
deleted file mode 100644
index d8d23e247784..000000000000
--- a/unused-attr-coreclr.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e2590a57e8fd557aec5b8a64bcca9308a950414b Mon Sep 17 00:00:00 2001
-From: Aaron Brodersen <aaron@abrodersen.com>
-Date: Wed, 13 Jul 2016 12:12:50 -0500
-Subject: [PATCH] Ignore unused return values
-
-Credit to Hazerd and leafi for identifying the issue and resolution.
----
- src/pal/src/exception/seh.cpp | 2 +-
- tests/src/Common/Platform/platformdefines.cpp | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/pal/src/exception/seh.cpp b/src/pal/src/exception/seh.cpp
-index 01de6e8..a89f800 100644
---- a/src/pal/src/exception/seh.cpp
-+++ b/src/pal/src/exception/seh.cpp
-@@ -233,7 +233,7 @@ SEHProcessException(PEXCEPTION_POINTERS pointers)
- {
- // 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/tests/src/Common/Platform/platformdefines.cpp b/tests/src/Common/Platform/platformdefines.cpp
-index 4caead5..3a2cae2 100644
---- a/tests/src/Common/Platform/platformdefines.cpp
-+++ b/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);
---
-2.9.0
-
diff --git a/unused-attr-corefx.patch b/unused-attr-corefx.patch
deleted file mode 100644
index 75ba7c70c2fd..000000000000
--- a/unused-attr-corefx.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 39334d46be9c3184fef8f762135e65216cc4ee84 Mon Sep 17 00:00:00 2001
-From: Aaron Brodersen <aaron@abrodersen.com>
-Date: Wed, 13 Jul 2016 11:23:10 -0500
-Subject: [PATCH] Ignore unused return values
-
-Credit to Hazerd and leafi for identifying the issue and resolution.
----
- src/Native/System.Native/pal_process.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Native/System.Native/pal_process.cpp b/src/Native/System.Native/pal_process.cpp
-index 74c4335..e64205d 100644
---- a/src/Native/System.Native/pal_process.cpp
-+++ b/src/Native/System.Native/pal_process.cpp
-@@ -142,7 +142,7 @@ extern "C" int32_t SystemNative_ForkAndExecProcess(const char* filename,
- // where the parent process uses members of Process, like ProcessName, when the Process
- // is still the clone of this one. This is a best-effort attempt, so ignore any errors.
- #if HAVE_PIPE2
-- pipe2(waitForChildToExecPipe, O_CLOEXEC);
-+ (void)pipe2(waitForChildToExecPipe, O_CLOEXEC);
- #endif
-
- // Fork the child process
---
-2.9.0
-