[LLVMdev] llvm-gcc with static libraries
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Thu Aug 11 08:31:21 PDT 2011
On 08/09/2011 05:08 PM, Ashay Rane wrote:
> Hi,
>
> Thanks for the pointers. I built binutils and installed them in the same
> place as llvm-gcc. However, I see the following error at the link step:
> $ llvm-gcc prog.c libctest.a
> collect2: ld terminated with signal 6 [Aborted]
> /tmp/llvm-gcc4.2-2.9-x86_64-linux/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.1/../../../../x86_64-unknown-linux-gnu/bin/ld:
> error: libctest.a: malformed archive header name at 8
Has libctest.a been created by llvm-ar? If I remember correctly, llvm-ar
uses a different index format that only llvm-ld understands :-(
You should use the regular bfd ar, just make sure it is using the plugin
too.
Cheers,
Rafael
More information about the llvm-dev
mailing list