overlay/dev-java/icedtea/files/3-sharkllvm30-MCJIT-v3.patch
2012-01-20 20:39:48 +01:00

39 lines
1.6 KiB
Diff

Taken from:
http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000399.html
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp 2011-08-31 11:39:35.630899283 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp 2011-08-31 16:10:00.459354097 +0200
@@ -72,6 +72,9 @@
// Initialize the native target
InitializeNativeTarget();
+ // MCJIT require a native AsmPrinter
+ InitializeNativeTargetAsmPrinter();
+
// Create the two contexts which we'll use
_normal_context = new SharkContext("normal");
_native_context = new SharkContext("native");
@@ -113,6 +116,7 @@
builder.setJITMemoryManager(memory_manager());
builder.setEngineKind(EngineKind::JIT);
builder.setErrorStr(&ErrorMsg);
+ builder.setUseMCJIT(true);
_execution_engine = builder.create();
if (!execution_engine()) {
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-31 14:40:04.392596214 +0200
+++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-31 14:41:27.569008721 +0200
@@ -60,7 +60,7 @@
#include <llvm/ExecutionEngine/JITMemoryManager.h>
#include <llvm/Support/CommandLine.h>
#if SHARK_LLVM_VERSION >= 27
-#include <llvm/ExecutionEngine/JIT.h>
+#include <llvm/ExecutionEngine/MCJIT.h>
#include <llvm/ADT/StringMap.h>
#include <llvm/Support/Debug.h>
#if SHARK_LLVM_VERSION >= 29