[LLVMdev] question about gccld and external libraries
John Criswell
criswell at cs.uiuc.edu
Tue Mar 1 09:18:24 PST 2005
Jakob Praher wrote:
> hi,
>
> I'm really new to llvm. I've successfully bootstrapped llvm-14 on my
> system and am able to successfully compile c code to llvm.
>
> the problem is now that gccld is complaining that it can't find the
> libraries, like "c" or "crtend". [1]
If you built your own llvm-gcc, then you need to build and install the
bytecode libraries as Misha directed.
However, if you downloaded a pre-built llvm-gcc frontend, then the
bytecode libraries should already be pre-built for you. If that is the
case, then chances are good that you need to set LLVM_LIB_SEARCH_PATH so
that gccld can find the libraries.
You can try setting the environment variable LLVM_LIB_SEARCH_PATH to
<cfrontend>/bytecode-libs, where <cfrontend> is the general installation
directory of llvm-gcc.
For example, if I downloaded the binary llvm-gcc frontend for Linux and
installed it in /home/john/cfrontend, then I would set
LLVM_LIB_SEARCH_PATH to /home/john/cfrontend/x86/llvm-gcc/bytecode-libs.
This step will not be required in future versions of LLVM, which is
probably why you missed it. The docs on the web page are the current
ones geared for the next release. If you go to
http://llvm.cs.uiuc.edu/releases/1.4/docs/index.html, you will see the
documentation pertaining to LLVM 1.4.
>
> all is fine, if I just use intrinsified functions like printf and
> friends, but I want to use the clock_gettime function and now the lli
> dumps.
>
> thanks for any pointers.
>
>
> -- jakob
>
> [1]
> gccld -o test-llvm
> -L/mnt/fire300/jp/llvm-14/lib/gcc/i686-pc-linux-gnu/3.4-llvm
> -L/mnt/fire300/jp/llvm-14/lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../..
> /tmp/ccc7ax7O.o -lc -lcrtend
>
> gccld: warning: Cannot find library 'c'
> gccld: warning: Cannot find library 'crtend'
> gccld: warning: Cannot find library 'c'
> gccld: warning: Cannot find library 'crtend'
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Regards,
-- John T.
--
John T. Criswell
Research Programmer
University of Illinois at Urbana-Champaign
"It's today!" said Piglet. "My favorite day," said Pooh.
More information about the llvm-dev
mailing list