[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/12672] New: LTO on powerpc will not work with static libraries
From: |
meissner at gcc dot gnu.org |
Subject: |
[Bug ld/12672] New: LTO on powerpc will not work with static libraries |
Date: |
Wed, 13 Apr 2011 21:22:44 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12672
Summary: LTO on powerpc will not work with static libraries
Product: binutils
Version: 2.22 (HEAD)
Status: NEW
Severity: critical
Priority: P2
Component: ld
AssignedTo: address@hidden
ReportedBy: address@hidden
Created attachment 5670
--> http://sourceware.org/bugzilla/attachment.cgi?id=5670
Tar file to show the problem
I built binutils for powerpc64-linux that was the top of the tree from April
12th, adding the --enable-plugins
I then built a GCC compiler that was top of the tree from April 13ths, using
that binutils for the target assembler, linker, etc. I added the options:
--with-plugin-ld=<path> --enable-plugin and --enable-lto to enable LTO.
I then tried a case where I was enabling vectorization of the math functions on
power7 with -ffast-math -mcpu=power7 -mveclibabi=mass, and I get undefined
errors (the MASS library is only available as static archives). If I extract
the objects and put them on the link line manually, it works fine. If I create
a shared library with these objects and use that, it also works. However, if I
use a static library, I get undefined errors.
I built a sample test case to try this out that is the attachment. In this
case, when linking test-lto1-static, I get:
-igoo-> make clean; make CC=/home/meissner/fsf-install-ppc64/trunk/bin/gcc all
rm -f *.[osia] *.so *.so.1 test-lto1-shared test-lto1-static all
/home/meissner/fsf-install-ppc64/trunk/bin/gcc -O3 -mcpu=power7
-mveclibabi=mass -ffast-math -flto -fwhole-program -fuse-linker-plugin -c
test-lto1-a.c
/home/meissner/fsf-install-ppc64/trunk/bin/gcc -O3 -mcpu=power7
-mveclibabi=mass -ffast-math -flto -fwhole-program -fuse-linker-plugin -c
test-lto1-b.c
/home/meissner/fsf-install-ppc64/trunk/bin/gcc -O3 -mcpu=power7
-mveclibabi=mass -ffast-math -flto -fwhole-program -fuse-linker-plugin -fpic -c
test-lto1-c.c
rm -f liblto1-shared.so.1
/home/meissner/fsf-install-ppc64/trunk/bin/gcc -shared -o liblto1-shared.so.1
-Wl,-soname,liblto1-shared.so.1 test-lto1-c.o
rm -f liblto1-shared.so
ln -s liblto1-shared.so.1 liblto1-shared.so
/home/meissner/fsf-install-ppc64/trunk/bin/gcc -o test-lto1-shared -O3
-mcpu=power7 -mveclibabi=mass -ffast-math -flto -fwhole-program
-fuse-linker-plugin test-lto1-a.o test-lto1-b.o -L . -Wl,-rpath,$(pwd)
-llto1-shared -lm
rm -f liblto1-static.a
ar cq liblto1-static.a test-lto1-c.o
ranlib liblto1-static.a
/home/meissner/fsf-install-ppc64/trunk/bin/gcc -o test-lto1-static -O3
-mcpu=power7 -mveclibabi=mass -ffast-math -flto -fwhole-program
-fuse-linker-plugin test-lto1-a.o test-lto1-b.o -L . -llto1-static -lm
/tmp/ccLckNND.ltrans0.ltrans.o:(.text.startup+0xc4): undefined reference to
`sind2'
collect2: ld returned 1 exit status
make: *** [test-lto1-static] Error 1
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/12672] New: LTO on powerpc will not work with static libraries,
meissner at gcc dot gnu.org <=
- [Bug ld/12672] LTO on powerpc will not work with static libraries, bergner at vnet dot ibm.com, 2011/04/13
- [Bug ld/12672] LTO on powerpc will not work with static libraries, meissner at gcc dot gnu.org, 2011/04/13
- [Bug ld/12672] LTO on powerpc will not work with static libraries, meissner at gcc dot gnu.org, 2011/04/13
- [Bug ld/12672] LTO on powerpc will not work with static libraries, hjl.tools at gmail dot com, 2011/04/14
- [Bug ld/12672] LTO on powerpc will not work with static libraries, amodra at gmail dot com, 2011/04/14
- [Bug ld/12672] LTO on powerpc will not work with static libraries, cvs-commit at gcc dot gnu.org, 2011/04/14
- [Bug ld/12672] LTO on powerpc will not work with static libraries, cvs-commit at gcc dot gnu.org, 2011/04/17
- [Bug ld/12672] LTO on powerpc will not work with static libraries, cvs-commit at gcc dot gnu.org, 2011/04/17
- [Bug ld/12672] LTO on powerpc will not work with static libraries, cvs-commit at gcc dot gnu.org, 2011/04/27
- [Bug ld/12672] LTO on powerpc will not work with static libraries, amodra at gmail dot com, 2011/04/27