[LLVMdev] llvm-ld support of native libraries
Ryan M. Lefever
lefever at crhc.uiuc.edu
Mon May 7 21:45:50 PDT 2007
What is the current status of llvm-ld's support of native libraries? I
have a bytecode file that needs to link against librt.so. So, I ran:
llvm-ld -native -o x.exe x.bc -L/usr/lib64 -lrt
and I get the following error:
/tmp/ccB7DGu1.o(.text+0x1a3): In function `main':
: undefined reference to `clock_gettime'
/tmp/ccB7DGu1.o(.text+0x6d8): In function `main':
: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
Is that error occurring because llvm-ld does not support native
libraries. I am able to use llc to turn x.bc into native assembly and
gcc to link the natively assembly against librt.so to get an executable,
but I was going to use the llvm native backend if possible.
Regards,
Ryan
More information about the llvm-dev
mailing list