summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kalinin2017-02-12 00:59:40 +0000
committerDmitry Kalinin2017-02-12 00:59:40 +0000
commit4ae127f5ac545792e30c05203799acbdae798ca8 (patch)
treeb2c8373f8d26d82e9cfae058c21a2eb0912c3356
downloadaur-4ae127f5ac545792e30c05203799acbdae798ca8.tar.gz
1) Initial commit.
-rw-r--r--.SRCINFO34
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD88
-rw-r--r--llvm-39-github-pull-8311.patch180
-rw-r--r--llvm-39-move.patch28
5 files changed, 333 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..69302482501d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = dotnet-cli-git
+ pkgdesc = The .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...)
+ pkgver = 1.0.0_rc4_004793
+ pkgrel = 1
+ url = https://github.com/dotnet/cli
+ 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
+ noextract = dotnet-cli-git-1.0.0_rc4_004793.tar.gz
+ options = staticlibs
+ source = coreclr-1.1.0.tar.gz::https://github.com/dotnet/coreclr/archive/v1.1.0.tar.gz
+ source = corefx-1.1.0.tar.gz::https://github.com/dotnet/corefx/archive/v1.1.0.tar.gz
+ source = dotnet-cli-git-1.0.0_rc4_004793.tar.gz::https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-debian-x64.latest.tar.gz
+ source = llvm-39-github-pull-8311.patch
+ source = llvm-39-move.patch
+ sha256sums = edc1e416f07a71e2b3f70c1f1412e45a7396b3f0daac5bcb267d5f779b9d7444
+ sha256sums = ca48ad090c72129ef145ef9b414767408a8fc1249e94a14dc6d4255b1e0b8648
+ sha256sums = a9e72c98b3e26f51090d41df8edb90314da93b490be02ca675b79234aa3c4974
+ sha256sums = 581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7
+ sha256sums = 84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d
+
+pkgname = dotnet-cli-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0465d3310ba6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/
+src/
+**.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..83eae3fd61bc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Dmitry Kalinin <lwinch2006.rss@protonmail.ch>
+pkgname=dotnet-cli-git
+pkgver="1.0.0_rc4_004793"
+pkgrel=1
+pkgdesc="The .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...)"
+arch=(x86_64)
+url="https://github.com/dotnet/cli"
+license=('MIT')
+groups=()
+depends=('lldb' 'libunwind' 'icu' 'lttng-ust' 'openssl' 'curl')
+makedepends=('cmake' 'make' 'clang' 'llvm' 'gettext')
+provides=('dotnet')
+conflicts=()
+replaces=()
+backup=()
+options=(staticlibs)
+install=
+
+_coreclrname="coreclr"
+_corefxname="corefx"
+_coreclrver="1.1.0"
+_corefxver="1.1.0"
+
+source=(
+ "${_coreclrname}-${_coreclrver}.tar.gz::https://github.com/dotnet/coreclr/archive/v1.1.0.tar.gz"
+ "${_corefxname}-${_corefxver}.tar.gz::https://github.com/dotnet/corefx/archive/v1.1.0.tar.gz"
+ "${pkgname}-${pkgver}.tar.gz::https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-debian-x64.latest.tar.gz"
+ 'llvm-39-github-pull-8311.patch'
+ 'llvm-39-move.patch')
+noextract=("${pkgname}-${pkgver}.tar.gz")
+sha256sums=('edc1e416f07a71e2b3f70c1f1412e45a7396b3f0daac5bcb267d5f779b9d7444'
+ 'ca48ad090c72129ef145ef9b414767408a8fc1249e94a14dc6d4255b1e0b8648'
+ 'a9e72c98b3e26f51090d41df8edb90314da93b490be02ca675b79234aa3c4974'
+ '581d6484626bbae820feb19d0613955fea333c025fb06d43a731a3db776686f7'
+ '84a0e56d00fd2f3f9f82b7d017652f03d4e7f80c6968d7fa1274f6e46af0ff3d')
+
+prepare() {
+ cd "${srcdir}/${_coreclrname}-${_coreclrver}"
+ patch -p1 < "${srcdir}/llvm-39-github-pull-8311.patch"
+ patch -p1 < "${srcdir}/llvm-39-move.patch"
+}
+
+build() {
+ cd "${srcdir}/${_coreclrname}-${_coreclrver}"
+ ./build.sh x64 release
+
+ cd "${srcdir}/${_corefxname}-${_corefxver}"
+ ./src/Native/build-native.sh x64 release
+}
+
+_coreclr_files=(
+ 'System.Globalization.Native.so'
+)
+
+_corefx_files=(
+ 'System.Security.Cryptography.Native.OpenSsl.so'
+)
+
+_copy_file() {
+ cp --force --preserve=mode $1 "$2/shared/Microsoft.NETCore.App/1.1.0/"
+ cp --force --preserve=mode $1 "$2/shared/Microsoft.NETCore.App/1.0.3/"
+}
+
+package() {
+ local _outdir="${pkgdir}/opt/dotnet"
+ mkdir -p "${_outdir}"
+
+ tar -C "${_outdir}" -xzf "${srcdir}/${pkgname}-${pkgver}.tar.gz"
+
+ local _clrdir="${srcdir}/${_coreclrname}-${_coreclrver}"
+
+ for file in "${_coreclr_files[@]}"; do
+ _copy_file "${_clrdir}/bin/Product/Linux.x64.Release/${file}" "${_outdir}"
+ done
+
+ local _fxdir="${srcdir}/${_corefxname}-${_corefxver}"
+
+ 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"
+ chmod -R go+r "${_outdir}"
+ chown -R 0:0 "${_outdir}"
+}
+
+# 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
+