[Gambas-user] LLVM compilation error
Tobias Boege
taboege at ...626...
Wed Dec 19 14:10:15 CET 2012
On Tue, 18 Dec 2012, Tobias Boege wrote:
> Hi Emil,
>
> Hans gave me some output from his gb.jit compilation attempt:
>
> --8<---------------
>
> make[4]: Betrete Verzeichnis '/home/hans/3.4/gb.jit/src'
> CXX gb_jit_la-jit_codegen.lo
> In file included from jit_codegen.cpp:34:0:
> jit.h:42:36: fatal error: llvm/Support/IRBuilder.h: No such file or
> directory
> compilation terminated.
> make[4]: *** [gb_jit_la-jit_codegen.lo] Fehler 1
> make[4]: Verlasse Verzeichnis '/home/hans/3.4/gb.jit/src'
> make[3]: *** [all-recursive] Fehler 1
> make[3]: Verlasse Verzeichnis '/home/hans/3.4/gb.jit'
> make[2]: *** [all] Fehler 2
> make[2]: Verlasse Verzeichnis '/home/hans/3.4/gb.jit'
> make[1]: *** [all-recursive] Fehler 1
> make[1]: Verlasse Verzeichnis '/home/hans/3.4'
> make: *** [all] Fehler 2
> hans at ...56...:~/3.4$ ^C
>
> --8<---------------
So, rev #5446 was verified to work in another thread[0] but I checked out
LLVM's svn repository (via the git mirror) and built the
$ llvm-config --version
3.3svn
which seems to not call some class "llvm:Attributes" (as in the 3.2svn or
so) but "llvm:Attribute" (as it was before), again.
The attached patch makes compilation work again for the more recent SVN
version. These LLVM people seem to be really uncertain about naming :-)
FYI, the commit logs show that:
a) Somewhen after rev #164727 (September) the llvm:Attribute class must have
vanished.
b) The re-renaming to llvm:Attribute was at rev #170502 (today morning!).
c) IRBuilder.h changed location with rev #159421 (June).
Regards,
Tobi
[0] http://sourceforge.net/mailarchive/message.php?msg_id=30248749
-------------- next part --------------
Index: gb.jit/src/jit_codegen.cpp
===================================================================
--- gb.jit/src/jit_codegen.cpp (revision 5448)
+++ gb.jit/src/jit_codegen.cpp (working copy)
@@ -3614,7 +3614,7 @@
create_gep(temp_errcontext1, TARGET_BITS, 0, TARGET_BITS, 0));
llvm::Function* f = llvm::cast<llvm::Function>(get_global_function(_setjmp, 'i', "p"));
-#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 2)
+#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR == 2
f->addFnAttr(llvm::Attributes::ReturnsTwice);
#else
f->addFnAttr(llvm::Attribute::ReturnsTwice);
@@ -3669,7 +3669,7 @@
create_gep(temp_errcontext2, TARGET_BITS, 0, TARGET_BITS, 0));
llvm::Function* f = llvm::cast<llvm::Function>(get_global_function(_setjmp, 'i', "p"));
-#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 2)
+#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR == 2
f->addFnAttr(llvm::Attributes::ReturnsTwice);
#else
f->addFnAttr(llvm::Attribute::ReturnsTwice);
More information about the User
mailing list