This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

hppa2.0w-hp-hpux11.00 linker error: spurious behaviour of -fweak (differs from i686-pc-linux-gnu)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]