[Gambas-user] Issue 564 in gambas: gambas3 doesn't build with llvm-3.5 [PATCH]
gambas at ...2524...
gambas at ...2524...
Mon Sep 29 13:48:55 CEST 2014
Status: New
Owner: ----
Labels: Version-3.5.0 Type-Review Priority-Medium OpSys-Any Dist-Any
Arch-Any Desktop-Any GUI-Any
New issue 564 by costamag... at ...626...: gambas3 doesn't build with llvm-3.5
[PATCH]
https://code.google.com/p/gambas/issues/detail?id=564
llvm-3.5 changed some headers files location, leading to a fail to build
from source
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763238
This patch makes gambas jit build correctly on debian with newer llvm-3.5,
and should maintain retrocompatibility with olders llvm.
--- a/gb.jit/configure.ac
+++ b/gb.jit/configure.ac
@@ -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(AutoUpgrade.h llvm-c/Core.h, /usr/lib/llvm* /usr/local/lib
/usr/local /usr/lib /usr `$LLVM_CONFIG --prefix`, include include/llvm
include/llvm/IR)],
[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])
--- a/gb.jit/src/jit.h
+++ b/gb.jit/src/jit.h
@@ -42,7 +42,13 @@
#include "llvm/Intrinsics.h"
#include "llvm/Instructions.h"
#endif
+#if (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
+#include "llvm/IR/Verifier.h"
+#include "llvm/IR/CFG.h"
+#else
#include "llvm/Analysis/Verifier.h"
+#include "llvm/Support/CFG.h"
+#endif
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/GenericValue.h"
@@ -57,7 +63,6 @@
#include "llvm/Support/IRBuilder.h"
#endif
#include "llvm/Support/DynamicLibrary.h"
-#include "llvm/Support/CFG.h"
#include "llvm/PassManager.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
More information about the User
mailing list