Error in libstdc++ bootstrapping egcs-20000110 on Solaris 7 x86

Bernard Michaud bmichaud@excom.com
Wed Jan 12 16:31:00 GMT 2000


At 12/01/2000 10:18 -0200, Alexandre Oliva wrote:
>On Jan 12, 2000, Bernard Michaud <bmichaud@excom.com> wrote:
>
> > $ as --version
> > GNU assembler 000111
>
>Huh?
>
> > $ env CC=gcc BOOT_CFLAGS="-O2 -mcpu=pentiumpro" 
> ../egcs-20000110/configure \
> > i686-sun-solaris2.7 --enable-shared --enable-haifa --enable-threads \
> > --prefix=/opt/egcs --without-gnu-ld --srcdir=../egcs-20000110
>
>No --with-gnu-as nor --with-as=/path/to/as?
>
>Have those libio/pic files been compiled with -fPIC?
>
> > ifstream type_info node             0x0         ../libio/pic/pfstream.o
>
>--

The gnu "as" assembler is from binutils on sourceware.cygnus.com; I've been 
using it since October 1999. In August and September 1999, the gradual 
porting to the egcs project of Richard Henderson's changes for the IA-32 
backend introduced syntax errors when the Solaris "as" was used, so I began 
to use the binutils from the Cygnus sourceware site.

I installed the gnu binutils in /usr/local/utils, renamed the Solaris 
/usr/ccs/bin/as, and made /usr/ccs/bin/as a symbolic link to the gnu "as", ie:

lrwxrwxrwx   1 root    other       23 Nov 10 20:33 /usr/ccs/bin/as -> 
/usr/local/utils/bin/as
-rwxr-xr-x   1 bin     bin     146248 Jun 17  1996 /usr/ccs/bin/as.old

I am not using any of the other gnu binutils; my linker is therefore the 
Solaris ld.

I tried to build egcs-20000110 again today (January 12) using --with-gnu-as 
and a different version of the gnu "as", but with the same result:

---------------------------------------------------------------------------- 
---------------

$ gcc -v
Reading specs from /opt/gcc-2.95.2/lib/gcc-lib/i686-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)
$ as --version
GNU assembler 000108
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `i686-sun-solaris2.7'.
$ env CC=gcc BOOT_CFLAGS="-O2 -mcpu=pentiumpro" ../egcs-20000110/configure \
i686-sun-solaris2.7 --enable-shared --enable-haifa --enable-threads 
--prefix=/opt/egcs \
--with-gnu-as --without-gnu-ld --srcdir=../egcs-20000110

...

  /playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio -nostdinc++  -fpic 
../../../egcs-20000110/libio/ioassign.cc -o pic/ioassign.o
/playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio 
-nostdinc++  ../../../egcs-20000110/libio/ioassign.cc
test x"yes" != xyes || \
   /playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio -nostdinc++  -fpic 
../../../egcs-20000110/libio/ioextend.cc -o pic/ioextend.o
/playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio 
-nostdinc++  ../../../egcs-20000110/libio/ioextend.cc
test x"yes" != xyes || \
   /playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio -nostdinc++  -fpic 
../../../egcs-20000110/libio/iomanip.cc -o pic/iomanip.o
/playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio 
-nostdinc++  ../../../egcs-20000110/libio/iomanip.cc
test x"yes" != xyes || \
   /playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio -nostdinc++  -fpic 
../../../egcs-20000110/libio/iostream.cc -o pic/iostream.o
/playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -c -g -O2 -fno-implicit-templates -I. 
-I../../../egcs-20000110/libio 
-nostdinc++  ../../../egcs-20000110/libio/iostream.cc

...

/playground/build/egcsobj/gcc/xgcc -B/playground/build/egcsobj/gcc/ 
-B/opt/egcs/i686-sun-solaris2.7/bin/ -g -O2 -fno-implicit-templates -h 
libstdc++.so.2.10.0 -shared -o libstdc++.so.2.10.0 `cat piclist` -lm
Text relocation remains                         referenced
     against symbol                  offset      in file
ifstream type_info node             0x0         ../libio/pic/pfstream.o
istream type_info node              0xc         ../libio/pic/stdiostream.o
istream type_info node              0x7c        ../libio/pic/iostream.o
istream type_info node              0x60        ../libio/pic/iostream.o
istream type_info node              0x20        ../libio/pic/fstream.o
istream type_info node              0x30        ../libio/pic/strstream.o
ofstream type_info node             0x14        ../libio/pic/pfstream.o
ofstream type_info node             0x4         ../libio/pic/PlotFile.o
ostream type_info node              0x50        ../libio/pic/strstream.o
ostream type_info node              0x24        ../libio/pic/stdiostream.o
ostream type_info node              0xa0        ../libio/pic/iostream.o
ostream type_info node              0x68        ../libio/pic/iostream.o
ostream type_info node              0x3c        ../libio/pic/fstream.o
fstream type_info node              0x0         ../libio/pic/SFile.o
iostream type_info node             0x70        ../libio/pic/strstream.o
iostream type_info node             0x58        ../libio/pic/fstream.o
fstreambase type_info node          0x50        ../libio/pic/fstream.o
fstreambase type_info node          0x18        ../libio/pic/fstream.o
fstreambase type_info node          0x34        ../libio/pic/fstream.o
strstreambase type_info node        0x48        ../libio/pic/strstream.o
strstreambase type_info node        0x68        ../libio/pic/strstream.o
strstreambase type_info node        0x28        ../libio/pic/strstream.o
ios type_info node                  0x10        ../libio/pic/strstream.o
ios type_info node                  0x4c        ../libio/pic/iostream.o
ios type_info node                  0x38        ../libio/pic/iostream.o
ios type_info node                  0x0         ../libio/pic/fstream.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make[2]: *** [libstdc++.so.2.10.0] Error 1
make[2]: Leaving directory 
`/playground/build/egcsobj/i686-sun-solaris2.7/libstdc++'
make[1]: *** [all-target-libstdc++] Error 2
make[1]: Leaving directory `/playground/build/egcsobj'
make: *** [bootstrap] Error 2

---------------------------------------------------------------------------- 
---------------

As you can see, the libio/pic files were compiled with -fpic.

Bernard Michaud
Excom Informatics Services



More information about the Gcc-bugs mailing list