Hello;<div><br></div><div>I was trying to create an executable from the "hmmer" benchmark source code files after applying some optimization.  I am running the following script - </div><div><br></div><div><div>#!/bin/bash</div>
<div>while read line; do</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>clang -S -emit-llvm  -DNDEBUG -DSPEC_CPU -o $line'.o' $line'.c'</div><div>done < files.txt</div><div>while read line; do</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span> opt -block-placement $line'.o' -o $line'.o'</div><div>done < files.txt</div><div><br></div><div>#export LLVM_LIB_SEARCH_PATH=/usr/lib</div>
<div>llvm-link *.o -o out.o.linked</div><div>llc out.o.linked</div><div>gcc out.o.linked.s -o hmmer</div><div><br></div><div>**files.txt contains the name of the source files of the hmmer benchmark.</div><div><br></div><div>
But "llc" gives me the following error - </div><div><br></div><div><div>/tmp/ccVq4r6d.o: In function `PostprocessSignificantHit':</div><div>out.o.linked:(.text+0xc1f6): undefined reference to `log'</div>
<div>/tmp/ccVq4r6d.o: In function `ParsePAMFile':</div><div>out.o.linked:(.text+0xc556): undefined reference to `log'</div></div><div><br></div><div>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?</div>
<div><br></div><div>Thank you;</div><div><br></div>-- <br>Arnamoy Bhattacharyya<br>Athabasca Hall 143<br>Department of Computing Science - University of Alberta<br>Edmonton, Alberta, Canada, T6G 2E8<br>780-680-7073<br>
</div>