[LLVMdev] Compiling natively vsftp with LLVM

Nai Xia nelson.xia at gmail.com
Thu Jun 1 20:45:30 PDT 2006


Hi,
I am using LLVM to compile vsftp to native x86 ELF code.
One of it's object file (sysdeputil) contains inline asm so cannot be compiled by gcc-3.4 frontend.
So I decided to firstly link together the llvm objects and libcrtend and compile it to native .o file and then link it with sysdeputil.o .

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? 

-- 
Regards,
Nai



More information about the llvm-dev mailing list