[LLVMdev] Problems with llvm-gcc and gold plugin

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Oct 25 10:48:35 PDT 2011


On 10/22/2011 01:12 AM, Luis D. Pedrosa wrote:
> Hi everyone,
>
> I'm new to LLVM and I'm still trying to learn how to get everything up
> and running. I'm trying to use llvm-gcc with the gold plugin and it
> complains that it can't find LLVMgold.so. As a simple test case I
> wrote a very basic C file:
> --- main.c ---
> int main () {
>           return 0;
> }
> ------
> and compiled it with:
> $ llvm-gcc -use-gold-plugin main.c
> llvm-gcc: -use-gold-plugin, but LLVMgold.so not found.
>
> The file in question, LLVMgold.so, was successfully compiled into
> llvm/Release+Asserts/lib/LLVMgold.so and I copied it into
> llvm-gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/LLVMgold.so. It is
> my understanding that the file is looked for in the same directory
> that has cc1 and I have a
> llvm-gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1.
>
> Does anyone know what I am missing?

I think you also need to copy libLTO.so, but I would recommend trying 
clang instead of llvm-gcc.

> Thanks.
>
> -- Luis D. Pedrosa
>
>

Cheers,
Rafael



More information about the llvm-dev mailing list