pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

llilc-git: Make this package building



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Feb 22 23:37:19 2016 +0100
Changeset:	3b37139fc83d16172240722f604a7ba0f4b98aa6

Modified Files:
	llilc-git/Makefile
Added Files:
	llilc-git/patches/patch-include_Jit_LLILCJit.h
	llilc-git/patches/patch-lib_CoreDisTools_coredistools.cpp

Log Message:
llilc-git: Make this package building

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3b37139fc83d16172240722f604a7ba0f4b98aa6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 llilc-git/Makefile                                 | 11 +++-
 llilc-git/patches/patch-include_Jit_LLILCJit.h     | 14 +++++
 .../patch-lib_CoreDisTools_coredistools.cpp        | 73 ++++++++++++++++++++++
 3 files changed, 96 insertions(+), 2 deletions(-)

diffs:
diff --git a/llilc-git/Makefile b/llilc-git/Makefile
index 4ccb1ee..46aff16 100644
--- a/llilc-git/Makefile
+++ b/llilc-git/Makefile
@@ -12,15 +12,22 @@ HOMEPAGE=	https://github.com/dotnet/llilc
 COMMENT=	LLVM based compiler for .NET Core
 LICENSE=	mit
 
+WRKSRC=		${WRKDIR}/llilc
+CONFIGURE_DIRS=	${WRKDIR}/build
+CMAKE_ARG_PATH=	${WRKSRC}
+
 USE_CMAKE=	yes
 USE_LANGUAGES=	c c++
 
 USE_TOOLS+=	bash
 REPLACE_BASH+=	build.sh
 
-#do-build:
-#		${RUN} cd ${WRKSRC} && PYTHON=${PYTHONBIN} ./build.sh
+CMAKE_ARGS+=	-DWITH_CORECLR:PATH=${PREFIX}/CoreCLR
+
+post-extract:
+	${RUN} mkdir -p ${WRKDIR}/build
 
+.include "../../wip/coreclr-git/buildlink3.mk"
 .include "../../wip/llvm-git/buildlink3.mk"
 .include "../../wip/lldb-git/buildlink3.mk"
 .include "../../wip/clang-git/buildlink3.mk"
diff --git a/llilc-git/patches/patch-include_Jit_LLILCJit.h b/llilc-git/patches/patch-include_Jit_LLILCJit.h
new file mode 100644
index 0000000..e7d03c4
--- /dev/null
+++ b/llilc-git/patches/patch-include_Jit_LLILCJit.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- include/Jit/LLILCJit.h.orig	2016-02-22 20:43:07.000000000 +0000
++++ include/Jit/LLILCJit.h
+@@ -25,7 +25,8 @@
+ #include "llvm/Support/ThreadLocal.h"
+ #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h"
+ #include "llvm/ExecutionEngine/Orc/NullResolver.h"
+-#include "llvm/Config/config.h"
++//#include "llvm/Config/config.h"
++#include "llvm/Config/llvm-config.h"
+ 
+ class ABIInfo;
+ class GcInfo;
diff --git a/llilc-git/patches/patch-lib_CoreDisTools_coredistools.cpp b/llilc-git/patches/patch-lib_CoreDisTools_coredistools.cpp
new file mode 100644
index 0000000..981067b
--- /dev/null
+++ b/llilc-git/patches/patch-lib_CoreDisTools_coredistools.cpp
@@ -0,0 +1,73 @@
+$NetBSD$
+
+--- lib/CoreDisTools/coredistools.cpp.orig	2016-02-22 20:43:07.000000000 +0000
++++ lib/CoreDisTools/coredistools.cpp
+@@ -49,13 +49,13 @@ public:
+   void printInstruction(const MCInst *MI, size_t Address, size_t InstSize,
+                         ArrayRef<uint8_t> Bytes) const;
+ 
+-  CorDisasm(TargetArch Target) { TargetArch = Target; }
++  CorDisasm(TargetArch Target) { TheTargetArch = Target; }
+ 
+ private:
+   bool setTarget();
+   bool verifyPrefixDecoding();
+ 
+-  TargetArch TargetArch;
++  TargetArch TheTargetArch;
+   string TargetTriple;
+   const Target *TheTarget;
+ 
+@@ -113,20 +113,20 @@ bool CorDisasm::setTarget() {
+   TargetTriple = Triple::normalize(TargetTriple);
+   Triple TheTriple(TargetTriple);
+ 
+-  switch (TargetArch) {
++  switch (TheTargetArch) {
+   case Target_Host:
+     switch (TheTriple.getArch()) {
+     case Triple::x86:
+-      TargetArch = Target_X86;
++      TheTargetArch = Target_X86;
+       break;
+     case Triple::x86_64:
+-      TargetArch = Target_X64;
++      TheTargetArch = Target_X64;
+       break;
+     case Triple::thumb:
+-      TargetArch = Target_Thumb;
++      TheTargetArch = Target_Thumb;
+       break;
+     case Triple::aarch64:
+-      TargetArch = Target_Arm64;
++      TheTargetArch = Target_Arm64;
+       break;
+     default:
+       errs() << "Unsupported Architecture"
+@@ -146,7 +146,7 @@ bool CorDisasm::setTarget() {
+     TheTriple.setArch(Triple::x86_64);
+   }
+ 
+-  assert(TargetArch != Target_Host && "Target Expected to be specific");
++  assert(TheTargetArch != Target_Host && "Target Expected to be specific");
+ 
+   // Get the target specific parser.
+   string Error;
+@@ -235,7 +235,7 @@ bool CorDisasm::init() {
+ // X86 prefix bytes are decoded by LLVM -- and learn about
+ // any change in behavior.
+ bool CorDisasm::verifyPrefixDecoding() {
+-  if ((TargetArch != Target_X86) && (TargetArch != Target_X64)) {
++  if ((TheTargetArch != Target_X86) && (TheTargetArch != Target_X64)) {
+     return true;
+   }
+ 
+@@ -296,7 +296,7 @@ size_t CorDisasm::disasmInstruction(size
+     }
+ 
+     ContinueDisasm = false;
+-    if ((TargetArch == Target_X86) || (TargetArch == Target_X64)) {
++    if ((TheTargetArch == Target_X86) || (TheTargetArch == Target_X64)) {
+ 
+       // Check if the decoded instruction is a prefix byte, and if so,
+       // continue decoding.


Home | Main Index | Thread Index | Old Index