diff options
author | Max Liebkies | 2017-03-08 12:11:58 +0100 |
---|---|---|
committer | Max Liebkies | 2017-03-08 12:13:19 +0100 |
commit | 9f9155c54001c5ff4b361f71e990134ac1f9ec40 (patch) | |
tree | 1b405c4efca8fcf24747d5df6843ad8e12cc2e48 | |
download | aur-9f9155c54001c5ff4b361f71e990134ac1f9ec40.tar.gz |
Initial release
-rw-r--r-- | .SRCINFO | 42 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 102 | ||||
-rw-r--r-- | fix-dtor-call.patch | 25 | ||||
-rw-r--r-- | fix-readdir-on-glibc-2.24.patch | 122 | ||||
-rw-r--r-- | llvm-39-github-pull-8311.patch | 180 | ||||
-rw-r--r-- | llvm-39-move.patch | 28 | ||||
-rw-r--r-- | lttng-uts-40.patch | 36 | ||||
-rw-r--r-- | no-libstdcpp-wrappers-for-stdlib.patch | 25 |
9 files changed, 564 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..574431f365fd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,42 @@ +pkgbase = dotnet-lts + pkgdesc = Provides the Long Term Service (LTS) versions of .NET core shared framework, i.e. coreclr and corefx. + pkgver = 1.0.4 + pkgrel = 1 + url = https://www.microsoft.com/net/core + arch = x86_64 + license = MIT + makedepends = cmake + makedepends = make + makedepends = clang + makedepends = llvm + makedepends = gettext + depends = lldb + depends = libunwind + depends = icu + depends = lttng-ust + depends = openssl + depends = curl + provides = dotnet=1.0.4 + conflicts = dotnet-bin + options = staticlibs + source = coreclr-1.0.4.tar.gz::https://github.com/dotnet/coreclr/archive/v1.0.4.tar.gz + source = corefx-1.0.4.tar.gz::https://github.com/dotnet/corefx/archive/v1.0.4.tar.gz + source = dotnet-lts-1.0.4.tar.gz::https://go.microsoft.com/fwlink/?LinkID=843462 + source = llvm-39-github-pull-8311.patch + source = llvm-39-move.patch + source = lttng-uts-40.patch + source = no-libstdcpp-wrappers-for-stdlib.patch + source = fix-dtor-call.patch + source = fix-readdir-on-glibc-2.24.patch + sha256sums = b49ba545fe632dfd5426669ca3300009a5ffd1ccf3c1cf82303dcf44044db33d + sha256sums = 4af6af035840072916c081976222a9f1780a0e797959a6478cefb4f7f837db5c + sha256sums = 4a59413a0b2ba8914ceecb4a505dae4f93ede10cae4246d714178b11cbe32a2f + sha256sums = 581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7 + sha256sums = 84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d + sha256sums = d7c6bbc24e8464dcfb4fd86cb76fa3a55f4822f5e8196e41a2c39650432aa401 + sha256sums = 8e97cb867f958170fe3613921965ef1c56d282e22c5ba8ff6687ed52b9fabf01 + sha256sums = 987d68c4ca5c5839773df292c76e2e044bc628118b96f1c80fcca55122cea1cb + sha256sums = 48005c5afda97770db17265285348cc059d414fff58354b690a4827fa755fc73 + +pkgname = dotnet-lts + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..6795f7d61f81 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/ +src/ +**.tar.gz +**.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b22d6cdaf28e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Max Liebkies <mail at maxliebkies dot de> + +pkgname=dotnet-lts +pkgver=1.0.4 +pkgrel=1 +pkgdesc="Provides the Long Term Service (LTS) versions of .NET core shared framework, i.e. coreclr and corefx." +arch=(x86_64) +url="https://www.microsoft.com/net/core" +license=('MIT') +groups=() +depends=('lldb' 'libunwind' 'icu' 'lttng-ust' 'openssl' 'curl') +makedepends=('cmake' 'make' 'clang' 'llvm' 'gettext') +provides=('dotnet=1.0.4') +conflicts=('dotnet-bin') +replaces=() +backup=() +options=(staticlibs) +install= + +source=( + "coreclr-${pkgver}.tar.gz::https://github.com/dotnet/coreclr/archive/v${pkgver}.tar.gz" + "corefx-${pkgver}.tar.gz::https://github.com/dotnet/corefx/archive/v${pkgver}.tar.gz" + "${pkgname}-${pkgver}.tar.gz::https://go.microsoft.com/fwlink/?LinkID=843462" + 'llvm-39-github-pull-8311.patch' + 'llvm-39-move.patch' + 'lttng-uts-40.patch' + 'no-libstdcpp-wrappers-for-stdlib.patch' + 'fix-dtor-call.patch' + 'fix-readdir-on-glibc-2.24.patch') + +sha256sums=('b49ba545fe632dfd5426669ca3300009a5ffd1ccf3c1cf82303dcf44044db33d' + '4af6af035840072916c081976222a9f1780a0e797959a6478cefb4f7f837db5c' + '4a59413a0b2ba8914ceecb4a505dae4f93ede10cae4246d714178b11cbe32a2f' + '581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7' + '84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d' + 'd7c6bbc24e8464dcfb4fd86cb76fa3a55f4822f5e8196e41a2c39650432aa401' + '8e97cb867f958170fe3613921965ef1c56d282e22c5ba8ff6687ed52b9fabf01' + '987d68c4ca5c5839773df292c76e2e044bc628118b96f1c80fcca55122cea1cb' + '48005c5afda97770db17265285348cc059d414fff58354b690a4827fa755fc73') + +prepare() { + cd "${srcdir}/coreclr-${pkgver}" + patch -p1 < "${srcdir}/llvm-39-github-pull-8311.patch" + patch -p1 < "${srcdir}/llvm-39-move.patch" + patch -p0 < "${srcdir}/lttng-uts-40.patch" + patch -p1 < "${srcdir}/no-libstdcpp-wrappers-for-stdlib.patch" + patch -p1 < "${srcdir}/fix-dtor-call.patch" + + cd "${srcdir}/corefx-${pkgver}" + patch -p1 < "${srcdir}/fix-readdir-on-glibc-2.24.patch" +} + +build() { + cd "${srcdir}/coreclr-${pkgver}" + ./build.sh x64 release + + cd "${srcdir}/corefx-${pkgver}" + ./build.sh native x64 release +} + +_coreclr_files=( + 'libclrjit.so' + 'libcoreclr.so' + 'libcoreclrtraceptprovider.so' + 'libdbgshim.so' + 'libmscordaccore.so' + 'libmscordbi.so' + 'libsosplugin.so' + 'libsos.so' + 'System.Globalization.Native.so' +) + +_corefx_files=( + 'System.IO.Compression.Native.so' + 'System.Native.so' + 'System.Native.a' + 'System.Net.Http.Native.so' + 'System.Net.Security.Native.so' + 'System.Security.Cryptography.Native.so' +) + +package() { + mkdir -p "${pkgdir}/opt/dotnet/shared/Microsoft.NETCore.App/" + + # copy the original files from the binary archive + cp --force --preserve=mode --recursive "${srcdir}/shared/Microsoft.NETCore.App/${pkgver}" "${pkgdir}/opt/dotnet/shared/Microsoft.NETCore.App/${pkgver}" + + for file in "${_coreclr_files[@]}"; do + cp --force --preserve=mode "${srcdir}/coreclr-${pkgver}/bin/Product/Linux.x64.Release/${file}" "${pkgdir}/opt/dotnet/shared/Microsoft.NETCore.App/${pkgver}/" + done + + for file in "${_corefx_files[@]}"; do + cp --force --preserve=mode "${srcdir}/corefx-${pkgver}/bin/Linux.x64.Release/Native/${file}" "${pkgdir}/opt/dotnet/shared/Microsoft.NETCore.App/${pkgver}/" + done + + chown -R root:root "${pkgdir}/opt/dotnet" + find "${pkgdir}/opt/dotnet" -name *.dll -exec chmod 644 {} \; + find "${pkgdir}/opt/dotnet" -name *.exe -exec chmod 755 {} \; + find "${pkgdir}/opt/dotnet" -name *.so -exec chmod 755 {} \; +} + +# vim:set ts=2 sw=2 et: diff --git a/fix-dtor-call.patch b/fix-dtor-call.patch new file mode 100644 index 000000000000..db3d33794d58 --- /dev/null +++ b/fix-dtor-call.patch @@ -0,0 +1,25 @@ +From c2ef0939ffa56dca0c923d7f484b69e30de205d2 Mon Sep 17 00:00:00 2001 +From: "John Chen (CLR)" <jochen@microsoft.com> +Date: Wed, 21 Sep 2016 10:58:39 -0700 +Subject: [PATCH] Fix OS X build break with AppleClang 8.0.0 + +Fixes issue #7275 +--- + src/pal/src/include/pal/sharedmemory.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/pal/src/include/pal/sharedmemory.h b/src/pal/src/include/pal/sharedmemory.h +index 475cd70..45cc4b2 100644 +--- a/src/pal/src/include/pal/sharedmemory.h ++++ b/src/pal/src/include/pal/sharedmemory.h +@@ -182,6 +182,10 @@ class SharedMemoryProcessDataBase + virtual void Close(bool isAbruptShutdown, bool releaseSharedData) + { + } ++ ++ virtual ~SharedMemoryProcessDataBase() ++ { ++ } + }; + + class SharedMemoryProcessDataHeader diff --git a/fix-readdir-on-glibc-2.24.patch b/fix-readdir-on-glibc-2.24.patch new file mode 100644 index 000000000000..68a4a2b89951 --- /dev/null +++ b/fix-readdir-on-glibc-2.24.patch @@ -0,0 +1,122 @@ +diff --git a/src/Native/System.Native/pal_io.cpp b/src/Native/System.Native/pal_io.cpp +index 7da1bff..f2001dc 100644 +--- a/src/Native/System.Native/pal_io.cpp ++++ b/src/Native/System.Native/pal_io.cpp +@@ -321,11 +321,13 @@ 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 +-// buffer into a managed string that the caller of the framework can use, making ++// 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 fill DirectoryEntry outputEntry with ++// pointers from byte[] buffer. ++// 5) The managed code uses DirectoryEntry outputEntry to find start of d_name ++// and the value of d_namelen, if avalable, to copy the name from ++// byte[] buffer into a managed string that the caller can use; this makes + // the 2nd and final strcpy. + extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferSize, DirectoryEntry* outputEntry) + { +@@ -341,6 +343,7 @@ extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferS + + dirent* result = nullptr; + dirent* entry = static_cast<dirent*>(buffer); ++#ifdef HAVE_READDIR_R + int error = readdir_r(dir, entry, &result); + + // positive error number returned -> failure +@@ -360,6 +363,27 @@ extern "C" int32_t SystemNative_ReadDirR(DIR* dir, void* buffer, int32_t bufferS + + // 0 returned with non-null result (guaranteed to be set to entry arg) -> success + assert(result == entry); ++#else ++ errno = 0; ++ result = readdir(dir); ++ ++ // 0 returned with null result -> end-of-stream ++ if (result == nullptr) ++ { ++ *outputEntry = {}; // managed out param must be initialized ++ ++ // kernel set errno -> failure ++ if (errno != 0) ++ { ++ assert(errno == EBADF); // Invalid directory stream descriptor dir. ++ return errno; ++ } ++ return -1; ++ } ++ ++ assert(result->d_reclen <= bufferSize); ++ memcpy(entry, result, static_cast<size_t>(result->d_reclen)); ++#endif + ConvertDirent(*entry, outputEntry); + return 0; + } +diff --git a/src/Native/configure.cmake b/src/Native/configure.cmake +index 017d75f..663aff8 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_READDIR_R) ++ ++check_cxx_source_compiles( ++ " + #include <sys/types.h> + #include <sys/event.h> + int main(void) +@@ -274,12 +288,12 @@ check_cxx_source_runs( + #include <sys/time.h> + int main() + { +- int ret; ++ int ret; + struct timespec ts; + ret = clock_gettime(CLOCK_MONOTONIC, &ts); + exit(ret); + } +- " ++ " + HAVE_CLOCK_MONOTONIC) + + check_function_exists( +@@ -399,9 +413,9 @@ check_function_exists( + + set (HAVE_INOTIFY 0) + if (HAVE_INOTIFY_INIT AND HAVE_INOTIFY_ADD_WATCH AND HAVE_INOTIFY_RM_WATCH) +- set (HAVE_INOTIFY 1) ++ set (HAVE_INOTIFY 1) + elseif (CMAKE_SYSTEM_NAME STREQUAL Linux) +- message(FATAL_ERROR "Cannot find inotify functions on a Linux platform.") ++ message(FATAL_ERROR "Cannot find inotify functions on a Linux platform.") + endif() + + check_cxx_source_compiles( +@@ -428,8 +442,8 @@ check_cxx_source_compiles( + check_cxx_source_compiles( + " + #include <curl/curl.h> +- int main() +- { ++ int main() ++ { + int i = CURL_SSLVERSION_TLSv1_0; + i = CURL_SSLVERSION_TLSv1_1; + i = CURL_SSLVERSION_TLSv1_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/lttng-uts-40.patch b/lttng-uts-40.patch new file mode 100644 index 000000000000..6534d0d5339e --- /dev/null +++ b/lttng-uts-40.patch @@ -0,0 +1,36 @@ +diff -Naur src/pal/src/configure.cmake-orig src/pal/src/configure.cmake
+--- src/pal/src/configure.cmake-orig 2016-12-27 09:27:00.480715728 -0500
++++ src/pal/src/configure.cmake 2016-12-27 09:26:28.707299084 -0500
+@@ -13,7 +13,7 @@
+ set(CMAKE_REQUIRED_INCLUDES /opt/local/include)
+ endif()
+ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+- set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
++ set(CMAKE_REQUIRED_DEFINITIONS "-D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
+ endif()
+
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64)
+@@ -33,7 +33,15 @@
+ check_include_files(lwp.h HAVE_LWP_H)
+ check_include_files(libunwind.h HAVE_LIBUNWIND_H)
+ check_include_files(runetype.h HAVE_RUNETYPE_H)
++
++if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
++ set(CMAKE_REQUIRED_FLAGS "-ldl")
++endif()
+ check_include_files(lttng/tracepoint.h HAVE_LTTNG_TRACEPOINT_H)
++if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
++ unset(CMAKE_REQUIRED_FLAGS)
++endif()
++
+ check_include_files(uuid/uuid.h HAVE_LIBUUID_H)
+ check_include_files(sys/sysctl.h HAVE_SYS_SYSCTL_H)
+ check_include_files(gnu/lib-names.h HAVE_GNU_LIBNAMES_H)
+@@ -62,7 +70,6 @@
+ check_function_exists(localtime_r HAVE_LOCALTIME_R)
+ check_function_exists(gmtime_r HAVE_GMTIME_R)
+ check_function_exists(timegm HAVE_TIMEGM)
+-check_function_exists(_snwprintf HAVE__SNWPRINTF)
+ check_function_exists(poll HAVE_POLL)
+ check_function_exists(statvfs HAVE_STATVFS)
+ check_function_exists(thread_self HAVE_THREAD_SELF)
\ No newline at end of file diff --git a/no-libstdcpp-wrappers-for-stdlib.patch b/no-libstdcpp-wrappers-for-stdlib.patch new file mode 100644 index 000000000000..d6859a309ddb --- /dev/null +++ b/no-libstdcpp-wrappers-for-stdlib.patch @@ -0,0 +1,25 @@ +From 7864b05cfcf16b1261962c5538e2f071759a1d9e Mon Sep 17 00:00:00 2001 +From: Juergen Hoetzel <juergen@archlinux.org> +Date: Fri, 27 May 2016 18:13:17 +0200 +Subject: [PATCH] Don't use libstdc++ wrappers for stdlib.h + +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> |