Hello,
I down loaded “llvm-gcc4.2-2.7-x86_64-linux” and I built Spec2006 with it. It is great and except for one benchmark the rest work fine. I want to build them with LTO now. I followed the directions in “http://llvm.org/docs/GoldPlugin.html” and built ar, nm-new, and ld-new in binutils. I also built libLLVMgold.so.
I get the following error:
llvm-gcc: -use-gold-plugin, but libLLVMgold.so not found.
The command I used with the example in “http://llvm.org/docs/GoldPlugin.html” is:
/home/reza/llvm-gcc4.2-2.7-x86_64-linux/bin/llvm-gcc -use-gold-plugin a.a b.o -o main
I put libLLVMgold.so
to /usr/lib/bfd-plugins
and ar, nm-new and ld-new in /usr/bin/ar and /usr/bin/nm and /usr/bin/ld respectively.
If I use the load by itself I get:
ld -plugin /usr/lib/bfd-plugins/libLLVMgold.so a.a b.o -o main
it loads but I get:
reza@reza-desktop:~/gcc/trunk/test/mytest$ ./main
Segmentation fault
Thanks,
Reza
Hello,
I down loaded "llvm-gcc4.2-2.7-x86_64-linux" and I built Spec2006 with it.
It is great and except for one benchmark the rest work fine. I want to build
them with LTO now. I followed the directions in
"http://llvm.org/docs/GoldPlugin.html" and built ar, nm-new, and ld-new in
binutils. I also built libLLVMgold.so.
I get the following error:
llvm-gcc: -use-gold-plugin, but libLLVMgold.so not found.
The command I used with the example in
"http://llvm.org/docs/GoldPlugin.html" is:
/home/reza/llvm-gcc4.2-2.7-x86_64-linux/bin/llvm-gcc -use-gold-plugin a.a
b.o -o main
I put libLLVMgold.so to /usr/lib/bfd-plugins and ar, nm-new and ld-new in
/usr/bin/ar and /usr/bin/nm and /usr/bin/ld respectively.
You have to put a link to libLLVMgold.so in a place where llvm-gcc
will find it. An easy one is the directory with cc1 in it.
If I use the load by itself I get:
ld -plugin /usr/lib/bfd-plugins/libLLVMgold.so a.a b.o -o main
it loads but I get:
reza@reza-desktop:~/gcc/trunk/test/mytest$ ./main
Segmentation fault
GCC adds other objects to the link that include startup code.
Thanks,
Reza
Cheers,
Thanks: copying to where cc1 was made it to work.
Reza