This is the mail archive of the gcc@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]

GCC 2.95.1 'make bootstrap' oddities on Solaris


Hello,

I am trying to 'make bootstrap' GCC 2.95.1 on Solaris 7. I got some segfaults
during build, but finally managed to build GCC. I would appreciate some insight
on what did happen.

The initial situation is as follows:
- The previously installed compiler is egcs-1.1.2.
- /usr/ucb is not in the PATH and /usr/ccs/bin contains Sun's as and ld with the
  latest patches available (107058-01 for as).
- The egcs-1.1.2 compiler may use GNU as and GNU ld from binutils-2.9.1. This is
  achieved following the FAQ instructions:
  	cd <egcs>/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66
  	ln -s <binutils>/bin/as
  	ln -s <binutils>/bin/ld

Then I try to build GCC 2.95.1. Here are 3 different scenarios:


1) - egcs-1.1.2 uses GNU as and ld following the FAQ instructions
   - directory /usr/ccs/bin is in the PATH, so Sun as and ld are available

   I get a segfault:
   	$ ./configure --enable-shared
   	$ make bootstrap
   	[...]
   	stage1/xgcc -Bstage1/ -B/pub_dom/gcc-2.95.1/sparc-sun-solaris2.7/bin/  -DIN_GCC -DHAIFA  -DSVR4  -O2 -g -O2  -DHAVE_CONFIG_H  -o gengenrtl \
   	 gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "alloca.o" in ?*) echo alloca.o ;; esac ` ` case "" in ?*) echo  ;; esac `  ` case "" in ?*) echo  ;; esac ` ` case "" in ?*) echo  ;; esac ` 
   	./gengenrtl tmp-genrtl.h tmp-genrtl.c
   	make[2]: *** [s-genrtl] Segmentation Fault
   	make[2]: Leaving directory `/home/papadopo/gcc-2.95.1/gcc'
   	make[1]: *** [bootstrap] Error 2
   	make[1]: Leaving directory `/home/papadopo/gcc-2.95.1/gcc'
   	make: *** [bootstrap] Error 2
   	$ 


2) - egcs-1.1.2 uses GNU as and ld following the FAQ instructions
   - <binutils>/bin is in the PATH

   I am able to build GCC 2.95.1. The resulting compiler yields warnings
   at link-time:
   	$ cat foo.cc
   	#include <iostream.h>
   	main() {
   	        cerr << "foo" << endl;
   	}
   	$ g++ -o foo foo.cc
   	ld: warning: file /pub_dom/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/libstdc++.so: section .stabstr: malformed string table, initial or final byte
   	$ 

   Is this a bug (incompatibility) in GNU or Sun ld. Any info somenone?


3) - egcs-1.1.2 does _not_ use GNU as and ld
   - directory /usr/ccs/bin is in the PATH, so Sun as and ld are available

   I am able to build GCC 2.95.1. The resulting compiler seems to be able to build
   with Sun's as and ld. I haven't tried it extensively.


Can someone explain why case 1 results in a segfault?

Thank you in advance,
--
Dimitri Papadopoulos


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