[LLVMdev] Error Linking Math Library
Arnamoy Bhattacharyya
arnamoy at ualberta.ca
Thu Mar 29 11:24:02 PDT 2012
Hello;
I was trying to create an executable from the "hmmer" benchmark source code
files after applying some optimization. I am running the following script
-
#!/bin/bash
while read line; do
clang -S -emit-llvm -DNDEBUG -DSPEC_CPU -o $line'.o' $line'.c'
done < files.txt
while read line; do
opt -block-placement $line'.o' -o $line'.o'
done < files.txt
#export LLVM_LIB_SEARCH_PATH=/usr/lib
llvm-link *.o -o out.o.linked
llc out.o.linked
gcc out.o.linked.s -o hmmer
**files.txt contains the name of the source files of the hmmer benchmark.
But "llc" gives me the following error -
/tmp/ccVq4r6d.o: In function `PostprocessSignificantHit':
out.o.linked:(.text+0xc1f6): undefined reference to `log'
/tmp/ccVq4r6d.o: In function `ParsePAMFile':
out.o.linked:(.text+0xc556): undefined reference to `log'
I tried setting the LLVM_LIB_SEARCH_PATH to find libm.a /libm.so, tried to
use the -L option of llvm-ld, but same error. Also I tried to give "-L"
option to llvm-link but it says "no such option"!! Anyone to help on this?
Thank you;
--
Arnamoy Bhattacharyya
Athabasca Hall 143
Department of Computing Science - University of Alberta
Edmonton, Alberta, Canada, T6G 2E8
780-680-7073
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120329/efead4ce/attachment.html>
More information about the llvm-dev
mailing list