* [gentoo-commits] gentoo-x86 commit in www-plugins/lightspark/files: lightspark-0.5.7-llvm-3.1_0002.patch lightspark-0.5.7-llvm-3.1_0001.patch lightspark-0.5.7-llvm-3.1_0000.patch
@ 2012-06-03 13:31 Chi-Thanh Christopher Nguyen (chithanh)
0 siblings, 0 replies; only message in thread
From: Chi-Thanh Christopher Nguyen (chithanh) @ 2012-06-03 13:31 UTC (permalink / raw
To: gentoo-commits
chithanh 12/06/03 13:31:33
Added: lightspark-0.5.7-llvm-3.1_0002.patch
lightspark-0.5.7-llvm-3.1_0001.patch
lightspark-0.5.7-llvm-3.1_0000.patch
Log:
Fix building with llvm-3.1, reported by maksbotan.
(Portage version: 2.2.0_alpha108/cvs/Linux x86_64)
Revision Changes Path
1.1 www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0002.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0002.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0002.patch?rev=1.1&content-type=text/plain
Index: lightspark-0.5.7-llvm-3.1_0002.patch
===================================================================
From 8381e86216b4cf23102cee566104cd38e5fb9208 Mon Sep 17 00:00:00 2001
From: alex <devkral@web.de>
Date: Sun, 27 May 2012 17:24:37 +0200
Subject: [PATCH] fix second compile bug with llvm 3.1
---
src/scripting/abc.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/scripting/abc.h b/src/scripting/abc.h
index 8ec3e8c..c8839cf 100644
--- a/src/scripting/abc.h
+++ b/src/scripting/abc.h
@@ -22,13 +22,11 @@
#ifdef LLVM_28
#define alignof alignOf
-#endif
-#ifdef LLVM_30
-#define LLVMTYPE llvm::Type*
-#define LLVMMAKEARRAYREF(T) makeArrayRef(T)
-#else
#define LLVMTYPE const llvm::Type*
#define LLVMMAKEARRAYREF(T) T
+#else
+#define LLVMTYPE llvm::Type*
+#define LLVMMAKEARRAYREF(T) makeArrayRef(T)
#endif
#include "compat.h"
--
1.7.10
1.1 www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0001.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0001.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0001.patch?rev=1.1&content-type=text/plain
Index: lightspark-0.5.7-llvm-3.1_0001.patch
===================================================================
From 1d9004f0cc14bff0a4f35590fa94e51c4723174d Mon Sep 17 00:00:00 2001
From: Alessandro Pignotti <a.pignotti@sssup.it>
Date: Sun, 27 May 2012 16:15:07 +0200
Subject: [PATCH] Fix support for LLVM 3.1
---
src/scripting/abc.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/scripting/abc.cpp b/src/scripting/abc.cpp
index 5fdae55..de7e0f3 100644
--- a/src/scripting/abc.cpp
+++ b/src/scripting/abc.cpp
@@ -23,10 +23,10 @@
#include <llvm/ExecutionEngine/JIT.h>
#include <llvm/LLVMContext.h>
#include <llvm/Target/TargetData.h>
-#ifdef LLVM_30
-#include <llvm/Support/TargetSelect.h>
-#else
+#ifdef LLVM_28
#include <llvm/Target/TargetSelect.h>
+#else
+#include <llvm/Support/TargetSelect.h>
#endif
#include <llvm/Target/TargetOptions.h>
#include <llvm/Analysis/Verifier.h>
--
1.7.10
1.1 www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0000.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0000.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/lightspark/files/lightspark-0.5.7-llvm-3.1_0000.patch?rev=1.1&content-type=text/plain
Index: lightspark-0.5.7-llvm-3.1_0000.patch
===================================================================
From eaed71005f8cfc1a421790ea2def20882e7d25c3 Mon Sep 17 00:00:00 2001
From: Alessandro Pignotti <a.pignotti@sssup.it>
Date: Mon, 21 May 2012 13:05:36 +0200
Subject: [PATCH] Add support for LLVM 3.1
---
CMakeLists.txt | 9 ++++++---
src/scripting/abc.cpp | 14 +++++++++++++-
src/scripting/abc.h | 2 +-
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be30cb1..6de575b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,9 +229,12 @@ ENDIF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.9)
IF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.8)
ADD_DEFINITIONS(-DLLVM_28)
ENDIF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.8)
-IF(${LLVM_STRING_VERSION} VERSION_GREATER 2.9)
- ADD_DEFINITIONS(-DLLVM_3)
-ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 2.9)
+IF(${LLVM_STRING_VERSION} VERSION_EQUAL 3.0)
+ ADD_DEFINITIONS(-DLLVM_30)
+ENDIF(${LLVM_STRING_VERSION} VERSION_EQUAL 3.0)
+IF(${LLVM_STRING_VERSION} VERSION_GREATER 3.0)
+ ADD_DEFINITIONS(-DLLVM_31)
+ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 3.0)
INCLUDE(FindZLIB REQUIRED)
INCLUDE(FindFreetype REQUIRED)
IF(NOT(ENABLE_GLES2))
diff --git a/src/scripting/abc.cpp b/src/scripting/abc.cpp
index 59700f6..e1d2834 100644
--- a/src/scripting/abc.cpp
+++ b/src/scripting/abc.cpp
@@ -23,7 +23,7 @@
#include <llvm/ExecutionEngine/JIT.h>
#include <llvm/LLVMContext.h>
#include <llvm/Target/TargetData.h>
-#ifdef LLVM_3
+#ifdef LLVM_30
#include <llvm/Support/TargetSelect.h>
#else
#include <llvm/Target/TargetSelect.h>
@@ -1442,14 +1442,26 @@ void ABCVm::Run(ABCVm* th)
if(th->m_sys->useJit)
{
+#ifdef LLVM_31
+ llvm::TargetOptions Opts;
+ Opts.JITExceptionHandling = true;
+#else
llvm::JITExceptionHandling = true;
+#endif
#ifndef NDEBUG
+#ifdef LLVM_31
+ Opts.JITEmitDebugInfo = true;
+#else
llvm::JITEmitDebugInfo = true;
#endif
+#endif
llvm::InitializeNativeTarget();
th->module=new llvm::Module(llvm::StringRef("abc jit"),th->llvm_context);
llvm::EngineBuilder eb(th->module);
eb.setEngineKind(llvm::EngineKind::JIT);
+#ifdef LLVM_31
+ eb.setTargetOptions(Opts);
+#endif
eb.setOptLevel(llvm::CodeGenOpt::Default);
th->ex=eb.create();
assert_and_throw(th->ex);
diff --git a/src/scripting/abc.h b/src/scripting/abc.h
index f56a2a7..d3adfeb 100644
--- a/src/scripting/abc.h
+++ b/src/scripting/abc.h
@@ -23,7 +23,7 @@
#ifdef LLVM_28
#define alignof alignOf
#endif
-#ifdef LLVM_3
+#ifdef LLVM_30
#define LLVMTYPE llvm::Type*
#define LLVMMAKEARRAYREF(T) makeArrayRef(T)
#else
--
1.7.10
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-03 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-03 13:31 [gentoo-commits] gentoo-x86 commit in www-plugins/lightspark/files: lightspark-0.5.7-llvm-3.1_0002.patch lightspark-0.5.7-llvm-3.1_0001.patch lightspark-0.5.7-llvm-3.1_0000.patch Chi-Thanh Christopher Nguyen (chithanh)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox