[LLVMdev] gold plugin use
John Criswell
criswell at uiuc.edu
Thu Mar 11 08:45:38 PST 2010
Swarup Kumar Sahoo wrote:
>>> Yes, ar and nm actually take -plugin option and if I pass this option, then I don't get these errors. But, llvm-gcc doesn't automatically pass this option to ar.
>>>
>> You probably just need to copy the gold plugin to
>> $PREFIX/lib/bfd-plugins. Let me know if that works. If not I will
>> check if there is a bug in the plugin search in binutils.
>>
>
> There is no problem in plugin search. If I give -plugin \path\to\plugin option to ar and nm, they are working fine. But, llvm-gcc doesn't pass this option to ar and nm automatically, so when I compile apache, I get those errors. When I wrote a small script to run ar with -plugin option for compiling apache, then I don't get these errors.
>
I don't believe that llvm-gcc is used to execute the ar command. Having
read everyone's input, I believe the problem stems from the fact that
your llvmGold.so is not in a directory in which ar searches for plugins
by default, *and* the Makefiles aren't passing the --plugin option to
ar, so ar never loads llvmGold.so and cannot link LLVM bitcode files.
The solution is to either convince the software's build system to run ar
with the --plugin option (you can set the AR environment variable before
running configure to do this) or place llvmGold.so in the bfd-plugins
directory as Rafael suggests (which will cause ar to load it whenever it
is run).
-- John T.
> BTW, there is no directory called bfd_plugins inside lib. I think, there is some mistake in the documentation. I just copied the plugin to /lib directory and it works fine.
>
> -Swarup.
>
>
>> Cheers,
>> --
>> Rafael Ávila de Espíndola
>>
>
> *************************************
> Swarup Kumar Sahoo
> Thomas M. Siebel Center for Computer Science
> University of Illinois at Urbana Champaign
> 201 N Goodwin Avenue
> Urbana, IL-61801
> Phone - 614 264 9574
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list