philippe marguinaud
2009-Mar-31 14:47 UTC
[LLVMdev] How to use the JIT with llvm-gfortran ?
Hi all, I am having a look at llvm-gfortran; it compiles OK, but I do not know how to using the JIT as described in http://llvm.org/docs/GettingStarted.html#tutorial. With llvm-gcc I managed to invoke the lli properly, but with llvm-gfortran compiled programs, it fails with the following message: philou at tleilax:~/gcc/llvm/install/bin$ lli ./main.bc 'main' function not found in module. I understand it does not find the entry point of the program ( gfortran creates a MAIN__ function to be linked with some other code ). What should I so to have the lli running fortran code ? Regards, Philippe _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090331/52ca68a2/attachment.html>
Hi, Have you try the "-entry-function=" parameter of lli ? Olivier. 2009/3/31 philippe marguinaud <pmarguinaud at hotmail.com>:> Hi all, > > I am having a look at llvm-gfortran; it compiles OK, but I do not know how > to using the JIT as described in > http://llvm.org/docs/GettingStarted.html#tutorial. With llvm-gcc I managed > to invoke the lli properly, but with llvm-gfortran compiled programs, it > fails with the following message: > > philou at tleilax:~/gcc/llvm/install/bin$ lli ./main.bc > 'main' function not found in module. > > I understand it does not find the entry point of the program ( gfortran > creates a MAIN__ function to be linked with some other code ). > > What should I so to have the lli running fortran code ? > > Regards, > > Philippe > > > ________________________________ > Get news, entertainment and everything you care about at Live.com. Check it > out! > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Anton Korobeynikov
2009-Mar-31 15:55 UTC
[LLVMdev] How to use the JIT with llvm-gfortran ?
Hi> I understand it does not find the entry point of the program > ( gfortran creates a MAIN__ function to be linked with some other > code ). > What should I so to have the lli running fortran code ?This can be tricky... I think you should compile libgfortran as .bc library and link it in. main() is library function there :( -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Seemingly Similar Threads
- [LLVMdev] llvm-gfortran gives errors on AMD64-Ubuntu
- sipsak 200 for a user, but 404 for a different user...why?
- [LLVMdev] llvm-gfortran gives errors on AMD64-Ubuntu
- [LLVMdev] llvm-gfortran gives errors on AMD64-Ubuntu
- sipsak 200 for a user, but 404 for a different user...why?