gambas3/gambas3-3.5.4-llvm-3.5.patch

46 lines
1.8 KiB
Diff

--- gambas3-3.5.4/gb.jit/configure.ac.orig 2014-09-20 12:56:11.194690422 +0200
+++ gambas3-3.5.4/gb.jit/configure.ac 2014-09-20 12:56:18.108690753 +0200
@@ -25,7 +25,7 @@
GB_COMPONENT(
jit, JIT, gb.jit, [src],
- [GB_FIND(llvm/AutoUpgrade.h llvm-c/Core.h, /usr/lib/llvm* /usr/local/lib /usr/local /usr/lib /usr `$LLVM_CONFIG --prefix`, include)],
+ [GB_FIND(llvm/IR/AutoUpgrade.h llvm-c/Core.h, /usr/lib/llvm* /usr/local/lib /usr/local /usr/lib /usr `$LLVM_CONFIG --prefix`, include)],
[GB_FIND(libLLVM-$LLVM_VERSION.$SHLIBEXT, /usr/lib/llvm* /usr/local /usr `$LLVM_CONFIG --prefix`, lib)],
[$C_LIB `$LLVM_CONFIG --ldflags` -lLLVM-$LLVM_VERSION],
[-I../../main/gbx -I../../main/share -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS])
--- gambas3-3.5.4/gb.jit/src/jit.h.in 2014-09-20 12:45:48.639660707 +0200
+++ gambas3-3.5.4/gb.jit/src/jit.h 2014-09-20 12:48:35.516668616 +0200
@@ -34,6 +34,7 @@
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Verifier.h"
#else
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
@@ -42,7 +43,11 @@
#include "llvm/Intrinsics.h"
#include "llvm/Instructions.h"
#endif
+#if (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
+#include "llvm/IR/Verifier.h"
+#else
#include "llvm/Analysis/Verifier.h"
+#endif
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/GenericValue.h"
@@ -57,7 +62,11 @@
#include "llvm/Support/IRBuilder.h"
#endif
#include "llvm/Support/DynamicLibrary.h"
+#if (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
+#include "llvm/IR/CFG.h"
+#else
#include "llvm/Support/CFG.h"
+#endif
#include "llvm/PassManager.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"