[LLVMdev] Linking library files using llvmc
Ravi Chandhran
kmrc87 at gmail.com
Wed Oct 7 09:25:46 PDT 2009
I was using llvmc along with the -opt option to perform static analyzes in
some of the commonly used programs like bzip2, gzip, grep etc. I found that
when llvmc is used to link libraries (.a or .so files) using the -l option
it passes the library files to the linker ( for me it was llvm-gcc itself)
but changes the order in which it was given to llvmc.
Eg: the command: " llvmc -o grep.o -v -opt grep.o -L../ -lgreputils " is
executed as
llvm-gcc -L../ -lgreputils grep.o -o grep
Note that the library files are pushed to front in llvm-gcc even though it
was given as the last option to llvmc. Due to this llvm-gcc is not able to
resolve the calls made in grep.o to the functions contained in greputils
library. looks like a bug in llvmc. The llvm version that I am using is
2.6 and the llvm-gcc version is 4.2.1.
-Ravichandhran Kandhadai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091007/fd94a897/attachment.html>
More information about the llvm-dev
mailing list