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

Re: [Fortran patch] Need to pass cc1 spec to f771


  In message <14200.43976.915967.290314@xayide.TechFak.Uni-Bielefeld.DE>you wri
te:
  > After successfully bootstrapping a bi-arch (32/64-bit) gcc 2.95 19990623
  > (prerelease) on Solaris 7/SPARC, I ran the testsuite for both ABIs and
  > noticed that all g77 tests failed with -m64 (i.e. 64-bit SPARC V9).
  > Looking into g77.log revealed that f771 complains
  > 
  > 	f771: -mptr32 not allowed on -m64
  > 
  > This error is from sparc.c (sparc_override_options) if -m64 is passed
  > without -mptr64.  Comparing the invocations of cc1 and f771, I noticed an
  > important difference:
  > 
  > ./xgcc -B./ -m64 -Q -v -S test.i
  > Reading specs from ./specs
  > gcc version gcc-2.95 19990623 (prerelease)
  >  ./cc1 test.i -mptr64 -mcpu=v9 -mstack-bias -mno-v8plus -m64 -version -o te
  > st.s
  > GNU C version gcc-2.95 19990623 (prerelease) (sparc-sun-solaris2.7) compile
  > d by GNU C version gcc-2.95 19990623 (prerelease).
  > options passed:  -mptr64 -mcpu=v9 -mstack-bias -mno-v8plus -m64
  > options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
  >  -freg-struct-return -fsched-interblock -fsched-spec -fcommon -fgnu-linker
  >  -fargument-alias -fident -mepilogue -mapp-regs -mptr64 -m64 -mstack-bias
  >  -mcpu=v9
  > 
  > ./g77 -B./ -m64 -Q -v -S test.f
  > g77 version gcc-2.95 19990623 (prerelease) (from FSF-g77 version 0.5.25 199
  > 90526 (prerelease))
  > Reading specs from ./specs
  > gcc version gcc-2.95 19990623 (prerelease)
  >  ./f771 test.f -dumpbase test.f -m64 -version -fversion -o test.s
  > f771: -mptr32 not allowed on -m64
  > GNU F77 version gcc-2.95 19990623 (prerelease) (sparc-sun-solaris2.7) compi
  > led by GNU C version gcc-2.95 19990623 (prerelease).
  > options passed:  -m64 -fversion
  > options enabled:  -fmove-all-movables -freduce-all-givs -fpeephole
  >  -ffunction-cse -fkeep-static-consts -freg-struct-return -fsched-interblock
  >  -fsched-spec -fcommon -fgnu-linker -fargument-noalias-global -fident
  >  -mepilogue -mapp-regs -mptr64 -m64
  > GNU Fortran Front End version 0.5.25 19990526 (prerelease)
  > 
  > i.e. gcc expands -m64 to -mptr64 -mcpu=v9 -mstack-bias -mno-v8plus -m64 for
  > cc1, but gcc/g77 pass it unchanged to f771.  If I call cc1 with just -m64,
  > I get the same error as from f771.  All other language frontends pass %1
  > (cc1 spec) to their respective backends, while g77 does not.  So the
  > correct fix seems to just add %1 to all f771 invocations in
  > f/lang-specs.h.  The patch below does this.  With this change, I rebuilt
  > gcc/g77 and re-ran the g77 testsuite: most fortrans test pass now for
  > -m64.  The full testresults are at
  > 
  > 	http://egcs.cygnus.com/ml/egcs-testresults/1999-06/msg00289.html
  > 
  > I haven't yet started to analyze the remaining fortran failures, but many
  > (most?) seem to occur on 64-bit IRIX 6 too and thus aren't 64-bit SPARC
  > specific.
  > 
  > 	Rainer
  > 
  > 
  > Mon Jun 28 20:28:06 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
  > 
  > 	* lang-specs.h: Pass cc1 spec to f771.
A very interesting can of worms.

CC1_SPEC according to the docs is supposed to be used for cc1, but the
docs do not discuss other languages.

Every other front-end passes CC1_SPEC along (Ada, Java, Chill, C++, and
Objective-C).

So it seems like CC1_SPEC no longer is specific to cc1, which is OK, except
that we need to update the documentation to indicate that it is passed to
all the languages.  I'll take care of that.

We might consider renaming cc1_spec so that it's name matches how it's actually
used.

Anyway, I've installed your patch and I'll submit/install the doc update
shortly.

Thanks,
jeff


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