[LLVMdev] Compiling natively vsftp with LLVM

Chris Lattner sabre at nondot.org
Thu Jun 1 22:13:49 PDT 2006


On Fri, 2 Jun 2006, Nai Xia wrote:
> The Makefile is sth like this:
>
> vsftpd: $(OBJS)
> 	gccld -r -native  -o vsftpd.o $(OBJS) -L/home/xianai/my_projects/llvm/cfrontend/x86/llvm-gcc/lib/ -lcrtend
>        gcc -o vsftpd vsftpd.o sysdeputil.o `./vsf_findlibs.sh`
>
>
> But the gcc/ld still cannot find the reference to __main.
> Do I have to compile crtend to native to solve this problem?

gccld -r doesn't work with -native.  Also, you do need to link in crtend, 
which doesn't happen with -r, only "producing an executable mode" links in 
libraries.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list