diff options
author | Max Liebkies | 2017-03-08 12:07:46 +0100 |
---|---|---|
committer | Max Liebkies | 2017-03-08 12:09:44 +0100 |
commit | 3d57b212191bddfe29adb439325fd830030bd349 (patch) | |
tree | 6fe80f2bd1a7739e5eebce48c4007a96000fcd88 | |
download | aur-3d57b212191bddfe29adb439325fd830030bd349.tar.gz |
Initial release
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 92 | ||||
-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 |
6 files changed, 376 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2dd90514010e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = dotnet + pkgdesc = Provides the .NET core shared framework, i.e. coreclr and corefx. + pkgver = 1.1.1 + 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.1.1 + conflicts = dotnet-bin + options = staticlibs + source = coreclr-1.1.1.tar.gz::https://github.com/dotnet/coreclr/archive/v1.1.1.tar.gz + source = corefx-1.1.1.tar.gz::https://github.com/dotnet/corefx/archive/v1.1.1.tar.gz + source = dotnet-1.1.1.tar.gz::https://go.microsoft.com/fwlink/?LinkID=843446 + source = llvm-39-github-pull-8311.patch + source = llvm-39-move.patch + source = lttng-uts-40.patch + sha256sums = 450ffcc9a68eef2e157419d4cc354deb618f80d3f1816fd0c8c99460718dbd85 + sha256sums = 83c37233ebe4d37f7c7ff5c7a91c8242704a6526c27c4c59a4967ad67e634c2e + sha256sums = 828af612b3e691f27d93153c3c7fd561e041535e907e9823f206ccab51030ecf + sha256sums = 581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7 + sha256sums = 84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d + sha256sums = d7c6bbc24e8464dcfb4fd86cb76fa3a55f4822f5e8196e41a2c39650432aa401 + +pkgname = dotnet + 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..c7b5366ca7b5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,92 @@ +# Maintainer: Max Liebkies <mail at maxliebkies dot de> + +pkgname=dotnet +pkgver=1.1.1 +pkgrel=1 +pkgdesc="Provides the .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.1.1') +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=843446" + 'llvm-39-github-pull-8311.patch' + 'llvm-39-move.patch' + 'lttng-uts-40.patch' +) +sha256sums=('450ffcc9a68eef2e157419d4cc354deb618f80d3f1816fd0c8c99460718dbd85' + '83c37233ebe4d37f7c7ff5c7a91c8242704a6526c27c4c59a4967ad67e634c2e' + '828af612b3e691f27d93153c3c7fd561e041535e907e9823f206ccab51030ecf' + '581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7' + '84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d' + 'd7c6bbc24e8464dcfb4fd86cb76fa3a55f4822f5e8196e41a2c39650432aa401') + +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" +} + +build() { + cd "${srcdir}/coreclr-${pkgver}" + ./build.sh x64 release + + cd "${srcdir}/corefx-${pkgver}" + ./src/Native/build-native.sh 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' + 'System.Security.Cryptography.Native.OpenSsl.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/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 |