sparcv9-2.95.2 update

Patrick J. McEvoy swagman@swagman.com
Wed Dec 8 20:00:00 GMT 1999


Dear GCC-BUGS,

Yesterday I reported a problem (included below) building a sparcv9-*-*
compiler from 2.95.2 sources. I finally managed to build it, but there
are two problems of which you might want to be aware.

1) /usr/css/bin/as in recent versions of Solaris seem to be incompatible
   with sparcv9-*-*.

   I was running the 11/99 release of Solaris 2.7 and had problems with
   /usr/css/bin/as I described yesterday. Then I got hold of a pre-compiled
   2.95.1 sparcv9-sun-solaris and it also had the same trouble with
   some programs. So...I wiped my disk and installed the 03/99 release
   of Solaris 2.7, and I had no more trouble with /usr/css/bin/as.

   Details: I was running the 11/99 release of Solaris 2.7 with the
   Maintenance patches installed. Patch 107058-01 was not installed.
   I had no trouble building sparc-sun-solaris, just sparcv9-sun-solaris.
   Seems the sparcv9-*-* compilers (stage1, stage2, final) put out code
   that recent /usr/css/bin/as can't handle.

2) Can't bootstrap sparcv9-*-*.

   Once I got past the /usr/css/bin/as, I ran into trouble trying to
   build the second stage compiler from stage1:

	Bootstrapping the compiler
	make[1]: Entering directory
	             `/opt/local/src/gcc/gcc-2.95.2/sparcv9-sun-solaris/gcc'
	make CC="gcc" libdir=/usr/local/lib LANGUAGES="c "
	make[2]: Entering directory
	             `/opt/local/src/gcc/gcc-2.95.2/sparcv9-sun-solaris/gcc'
	gcc  -DIN_GCC -DHAIFA  -DSVR4  -g  -DHAVE_CONFIG_H
	             -o cccp cccp.o cexp.o intl.o prefix.o version.o  mbchar.o
                     obstack.o alloca.o       ../libiberty/libiberty.a
	ld: fatal: file cccp.o: wrong machine class
	ld: fatal: File processing errors. No output written to cccp
	collect2: ld returned 1 exit status
	make[2]: *** [cccp] Error 1
	make[2]: Leaving directory
	             `/opt/local/src/gcc/gcc-2.95.2/sparcv9-sun-solaris/gcc'
	make[1]: *** [bootstrap] Error 2
	make[1]: Leaving directory
	             `/opt/local/src/gcc/gcc-2.95.2/sparcv9-sun-solaris/gcc'
	make: *** [bootstrap] Error 2

   Indeed, the stage1 cccp.o looks wrong:

	% find . -name cccp.o -exec file {} \; 
	./gcc/cccp.o:   ELF 64-bit MSB relocatable SPARCV9 Version 1
	./gcc/stage1/cccp.o:    ELF 32-bit MSB relocatable SPARC Version 1
	%

   Details: I had tried bootstrapping the compiler with a pre-compiled
   2.95.2 from SunFreeware.Com as well as the sparc-sun-solaris I built.
   Neither one worked. Then I got pre-compiled 2.95.1 sparcv9-sun-solaris
   from a colleague and was able to build the compiler. Seems one can't
   build sparcv9 without another 64-bit compiler to start with. I recommend
   you make one available at GNU or Cygnus or SunFreeware.Com.

Patrick

----- Begin Included Message -----

>From swagman@swagman.com Tue Dec  7 15:35 PST 1999
Date: Tue, 07 Dec 1999 15:42:18 -0800
From: "Patrick J. McEvoy" <swagman@swagman.com>
X-Accept-Language: en
To: gcc-bugs@gcc.gnu.org
Subject: can't build sparcv9-sun-solaris

Dear GCC-BUGS,

I can't seem to build a sparcv9 (64-bit) compiler from 2.95.2 source,
although the
same source tree builds the default (32-bit) compiler for my Sun Ultra-5
Solaris 2.7
box just fine.

    -- I realize sparc64 is not supported in 2.95.2, but I think sparcv9
	is supported

    -- as per the gcc instructions I am using Sun's /usr/ccs/bin/{as,ld}
	rather than binutils.

    -- for my bootstrap compiler I have tried both the 32-bit compiler I
	built from this source tree and a pkgadd-format version of 2.95.2
	from www.sunfreeware.com

    -- since the problem is showing up in /usr/ccs/bin/as, I have tried
	both "---without-gnu-as --without-gnu-ld" and
	"--with-gnu-as--with-gnu-ld"

    -- as per the gcc instructions, I do not have
	patch 107058-01 (1999-01-13) installed.

Here's the sequence:

    mkdir obj
    cd obj
    ../src/configure sparcv9-sun-solaris
    make bootstrap

[I've also tried ../src/configure sparcv9-sun-solaris2.7]

The build always dies on the first pass when it is trying to make
libgcc2.a (full error log below):

    /usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 274: error: detect
global register use\

not covered .register pseudo-op

It seems the compiler is putting out stuff that Sun's assembler can't
handle.

Swagman

 ==========================================================

make libgcc2.a
rm -f tmplibgcc2.a
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2  _lshrdi3
_ashldi3 _ashrdi3 _ffsdi2  _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2
_floatdidf _floatdisf  _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi
_fixunssfdi _fixsfdi  _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi
_fixtfdi _fixunstfdi _floatditf  __gcc_bcmp _varargs __dummy _eprintf
_bb _shtab _clear_cache _trampoline __main _exit  _ctors _pure; \
do \
  echo ${name}; \
  ./xgcc -B/usr/local/sparcv9-sun-solaris2.7/bin/ -B./
-I/usr/local/sparcv9-sun-solaris2.7/include -O2   -DIN_GCC -DHAIFA
-DSVR4  -g -I./include  -fPIC -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -I. -I../../src/gcc -I../../src/gcc/config
-I../../src/gcc/../include -c -DL${name} \
       ../../src/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  `  if [ -f /opt/local/src/gcc-2.95.2/onemotime/gcc/../binutils/ar ] ;
then  echo /opt/local/src/gcc-2.95.2/onemotime/gcc/../binutils/ar ;
else  if [ "sparcv9-sun-solaris2.7" = "sparcv9-sun-solaris2.7" ] ; then
echo ar;  else  t='s,x,x,'; echo ar | sed -e $t ;  fi;  fi` rc
tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 274: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 274: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 275: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 275: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 310: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 310: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 314: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 314: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 314: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 314: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 317: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 318: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 319: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 321: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 321: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 322: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 322: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 324: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 325: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 325: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 326: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 326: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 327: error: detect global
register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccsfxys9.s", line 329: error: detect global
register use not covered .register pseudo-op
*** Error code 1
make: Fatal error: Command failed for target `libgcc2.a'




----- End Included Message -----



More information about the Gcc-bugs mailing list