Jakob Praher
2005-Mar-01 17:45 UTC
[LLVMdev] Re: question about gccld and external libraries
Chris Lattner wrote:> On Tue, 1 Mar 2005, Jakob Praher wrote: > >> thanks for the pointer. Yes I've done that, but in the new shell >> session I apparently forgot to set the LLVM_LIB_SEARCH_PATH. >> >> now gccld isn't complaining anymore but the interpreter doesn't seem >> to like it still: > > > It looks like the jit doesn't find these because they are located in > librt. Try this (or adapt to whatever system you're using): > > lli -load /usr/lib/librt.so yourprog.bcoh. thanks that worked.> > If you pass '-lrt' when linking your program, it should take care of > this for you. >ah ok. so every library thet gccld can't find as a bytecode lib is added to the shell script then. -- Jakob
Chris Lattner
2005-Mar-01 17:59 UTC
[LLVMdev] Re: question about gccld and external libraries
On Tue, 1 Mar 2005, Jakob Praher wrote:>> If you pass '-lrt' when linking your program, it should take care of this >> for you. >> > > ah ok. so every library thet gccld can't find as a bytecode lib is added to > the shell script then.Yup. Note there are other options if you don't want to run your program in the JIT. In particular, you can use these commands: llvm-gcc x.c -Wl,-native -lrt -l... llvm-gcc x.c -Wl,-native-cbe ... To produce native executables that do not need the JIT. The first option uses the native LLVM code generator, the second uses the C backend and a system C compiler. -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
Jakob Praher
2005-Mar-01 18:29 UTC
[LLVMdev] Re: question about gccld and external libraries
Chris Lattner wrote:> On Tue, 1 Mar 2005, Jakob Praher wrote: > >>> If you pass '-lrt' when linking your program, it should take care of >>> this for you. >>> >> >> ah ok. so every library thet gccld can't find as a bytecode lib is >> added to the shell script then. > > > Yup. Note there are other options if you don't want to run your program > in the JIT. In particular, you can use these commands: > > llvm-gcc x.c -Wl,-native -lrt -l... > llvm-gcc x.c -Wl,-native-cbe ... > > To produce native executables that do not need the JIT. The first > option uses the native LLVM code generator, the second uses the C > backend and a system C compiler.thanks for the info. what is the advantage of doing so? I suppose the at-link-time-optimization stuff, so I suppose that the nativization happens at link time? (haven't done the -v on that). Otherwise this wouldn't make much sense. In my case I am strongly interested in llvm as a low level vm (jit) for all kinds of (bytecode/language) frontends. Like libjava and libmono. Plus I'd like to experiment with it with regards to analyzing large systems. But I am at the very start. I've also talked to gcj people at the FOSDEM and they would also be interested in that sort of thing at least they need a decent jit/dynamic compiler. It should really be easier in the free world to bridge all those languages and llvm seems a viable solution for that. I'll come with more info on that. Thanks for your support. -- Jakob> > -Chris >
Apparently Analagous Threads
- [LLVMdev] Re: question about gccld and external libraries
- [LLVMdev] Re: question about gccld and external libraries
- [LLVMdev] Re: question about gccld and external libraries
- [LLVMdev] question about gccld and external libraries
- [LLVMdev] Re: question about gccld and external libraries