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]

Help adding new architecture


I'm working off a copy of the 19981122 snapshot.

I'm trying to add hppa 2.0 hooks to egcs and am running into a little
difficulty.  I'm starting off by trying to add an extra flag to the pa
target_flags.  I did 2 things.  First, I've tried to convert all the
target_flags bits with MASK_ defines in pa.h, as was done under
sparc.h.  Then, I tried to add a pa2.0 flag in addition to the 1.1 flag
that is already there.  I made it bit 2 and shifted all the others down
one.  I also changed the TARGET_DEFAULT definitions in pa-gas.h,
pa-pro.h, and pa1.h to use the MASK defines instead of hard-coded
constants.

Now, I try to configure and built egcs.  I'm using the HP development cc
compiler for building the stage 1 gcc.  Everything builds up to the
point when the stage1 xgcc is used to compile __muldi3, where I get the
following:

... [snip] ...
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./
-B/usr/local/pkg/egcs/pa2.0-egcs-19981101/hpux-10.20/hppa1.1-hp-hpux10.20/bin/
-O2   -DIN_GCC    -g  -I./include  -fPIC -g1  -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
/usr/local/pkg/egcs/pa2.0-egcs-19981101/build/gcc/../binutils/ar ] ;
then echo
/usr/local/pkg/egcs/pa2.0-egcs-19981101/build/gcc/../binutils/ar ; else
if [ "hppa1.1-hp-hpux10.20" = "hppa1.1-hp-hpux10.20" ] ; 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
../../src/gcc/libgcc2.c: In function `__muldi3':
../../src/gcc/libgcc2.c:296: `asm' needs too many reloads
make[2]: *** [libgcc2.a] Error 1
make[2]: Leaving directory
`/tmp_mnt/usr/local/pkg/egcs/pa2.0-egcs-19981101/build/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory
`/tmp_mnt/usr/local/pkg/egcs/pa2.0-egcs-19981101/build/gcc'
make: *** [bootstrap] Error 2
bmtlh4d0:/usr/local/pkg/egcs/pa2.0-egcs-19981101/build> 

Here's my config.status:

#!/bin/sh
# This file was generated automatically by configure.  Do not edit.
# This directory was configured as follows:
../src/configure
--with-gcc-version-trigger=/usr/local/pkg/egcs/pa2.0-egcs-19981
101/src/gcc/version.c --host=hppa1.1-hp-hpux10.20
--prefix=/usr/local/pkg/egcs/p
a2.0-egcs-19981101
--exec-prefix=/usr/local/pkg/egcs/pa2.0-egcs-19981101/hpux-10
.20 --with-gnu-as --with-fast-fixincludes --norecursion 
# using "mh-frag"

Without my changes, the snapshot builds with no problem.  I suspect I
missed a hardcoded assumption about target_flags, but I can't find it
and am not familiar with the code.  Can anyone help me?

Thanks,

-- 
Jerry Quinn                             Tel: (514) 761-8737
jquinn@nortel.ca                        Fax: (514) 761-8505
Speech Recognition Research


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