This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
hppa2.0w-hp-hpux11.00 linker error: spurious behaviour of -fweak (differs from i686-pc-linux-gnu)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: hppa2.0w-hp-hpux11.00 linker error: spurious behaviour of -fweak (differs from i686-pc-linux-gnu)
- From: Markus Werle <markus at lufmech dot rwth-aachen dot de>
- Date: Tue, 26 Jun 2001 18:21:04 +0200
Hi!
I finally found out what gave me linkage errors on hpux:
option -fweak hinders template instatiation on hpux every second time
Look at this
[markus] HP_LINKER_BUG/ > rm *.o
[markus] HP_LINKER_BUG/ > make
g++ -fweak -c Test.C
g++ -fweak -c main.C
g++ -fweak -o test.exe Test.o main.o
collect: recompiling Test.C
collect: relinking
/usr/ccs/bin/ld: Unsatisfied symbols:
Test<Dummy>::DoIt() (code)
collect2: ld returned 1 exit status
make: *** [all] Error 1
[markus] HP_LINKER_BUG/ > rm *.o
[markus] HP_LINKER_BUG/ > make
g++ -fweak -c Test.C
g++ -fweak -c main.C
g++ -fweak -o test.exe Test.o main.o
collect: recompiling Test.C
collect: relinking
AND SO ON, reproducable!
Any explanation?
[markus@tresca] HP_LINKER_BUG/ > g++ -v
Reading specs from
/opt/FREE-SOFTWARE/gcc-3.0/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0/specs
Configured with: ../gcc-3.0/configure --host=hppa2.0w-hp-hpux11.00
--prefix=/opt/FREE-SOFTWARE/gcc-3.0 --enable-languages=c,c++
--with-gnu-as --without-gnu-ld
--with-as=/opt/FREE-SOFTWARE/gcc-3.0/bin/as
--with-ld=/opt/FREE-SOFTWARE/gcc-3.0/bin/ld --enable-threads
--enable-version-specific-runtime-libs
Thread model: single
gcc version 3.0
HP_LINKER_BUG.tar