egcs-970929: SunOS and --enable-shared - HOW?

Manfred Hollstein manfred@ks.sel.alcatel.de
Wed Oct 8 01:51:00 GMT 1997


Hi,

I'm just trying to build egcs using:

$ env CC=gcc CFLAGS=-O   LDFLAGS=-s INSTALL="/tools/gnu/bin/install -c" INSTALL_DATA="/tools/gnu/bin/install -c -m 644" INSTALL_PROGRAM="/tools/gnu/bin/install -c -m 755" /bin/sh ../egcs-970929/configure sparc-sun-sunos4.1.4 --srcdir=../egcs-970929 --prefix=/u/b60/manfred/gnu/sparc-sun-sunos4 --with-gnu-as --enable-shared --with-gxx-include-dir='/u/b60/manfred/gnu/sparc-sun-sunos4/lib/gcc-lib/sparc-sun-sunos4.1.4/egcs-2.90.11/include/g++' --with-local-prefix=/u/b60/manfred/gnu/sparc-sun-sunos4 --verbose

Building the compiler went  fine, but building the shared  libstdc++'s
fails miserably:

/u/b60/manfred/work/GNU/egcs-970929-sparc-sun-sunos4.1.4/gcc/xgcc -B/u/b60/manfred/work/GNU/egcs-970929-sparc-sun-sunos4.1.4/gcc/ -g -O2 -fno-implicit-templates  -fpic -fPIC -shared -o libstdc++.so.2.8.0 `cat piclist` 
ld: /u/b60/manfred/work/GNU/egcs-970929-sparc-sun-sunos4.1.4/gcc/libgcc.a(_eh.o): assert pure-text failed: reference to [offset] at 1f874 in /u/b60/manfred/work/GNU/egcs-970929-sparc-sun-sunos4.1.4/gcc/libgcc.a

ld: /u/b60/manfred/work/GNU/egcs-970929-sparc-sun-sunos4.1.4/gcc/libgcc.a(_eh.o): assert pure-text failed: reference to [offset] at 1f878 in /u/b60/manfred/work/GNU/egcs-970929-sparc-sun-sunos4.1.4/gcc/libgcc.a

[lots of messages deleted]

There seem to be two problems:

  1. PICFLAG=-fPIC
     is declared unconditionally although this should come from the
     multilib stuff

  2. $ ./xgcc -B./ --print-multi-lib
     .;
     pic;@fpic		# Error occurs here
     ucpic;@fPIC
     v8;@mcpu=v8
     pic/v8;@fpic@mcpu=v8
     ucpic/v8;@fPIC@mcpu=v8

     Why is xgcc using libgcc.a from ${libsubdir} instead of
     ${libsubdir}/pic ?

Can anybody who believes  to  have built a  shared libstdc++  on SunOS
successfully shed some light on this?

Thanks
--
 Manfred Hollstein                               Alcatel, Dept. US/EC4
 < mailto:manfred@lts.sel.alcatel.de >             Lorenzstrasse 10
                                                 70435 Stuttgart
 Public PGP key on request                       Germany



More information about the Gcc mailing list