compiling gcc-1.31

Mike Haertel mike at thor.stolaf.edu
Sun Dec 11 12:59:50 AEST 1988


In article <455 at manta.pha.pa.us> brant at manta.pha.pa.us (Brant Cheikes) writes:
>The gcc-1.31 that I'm running successfully compiled the latest
>web2c/TeX/LaTeX available from ics.uci.edu.  I needed the -traditional
>and -writable-strings options on web2c and tangle, but the actual
>web2c-generated C source compiled fine with just -O. [. . .]
>
>I tried building Gnu Emacs 18.52 using every combination of -O,
>-traditional, and -writable-strings, with no luck.  An executable was
>created that consistently core-dumped while loading rmail.  I haven't
>tried to track the problem down.

I didn't need to use -fwritable-strings or -traditional to compile
web2c.  I got my copy from labrea.stanford.edu; the last time I looked
that was more recent than the one available from ics.uci.edu.

Emacs didn't work.  After cross-compiling gcc, I downloaded the source
and spent some time hunting around in the code.  The following diff
tells all.  I used the bugged gcc to compile a clean one, and used that
one to recompile itself, just in case.  Emacs works now too.  Or
at least rmail and C-X C-B no longer dump core.  I don't use rmail,
but I *do* like the multiple buffer things; emacs as a single file editor
just doesn't cut it :-)  I am mailing these changes to Richard, so
they should appear in the next version of gcc.

*** tm-3b1.h~	Thu Nov 17 11:14:12 1988
--- tm-3b1.h	Fri Dec  9 22:15:54 1988
***************
*** 282,287
  	  if (scale != 1) fprintf (FILE, ":%d", scale);			\
  	  fprintf (FILE, ")");						\
  	  break; }							\
        if (ireg != 0 || breg != 0)					\
  	{ int scale = 1;						\
  	  if (breg == 0)						\

--- 282,293 -----
  	  if (scale != 1) fprintf (FILE, ":%d", scale);			\
  	  fprintf (FILE, ")");						\
  	  break; }							\
+       if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF)	\
+         { fprintf (FILE, "LD%%%d(%%pc,%s.l",				\
+ 		   CODE_LABEL_NUMBER (XEXP (addr, 0)),			\
+ 		   reg_name[REGNO (breg)]);				\
+ 	  putc (')', FILE);						\
+ 	  break; }							\
        if (ireg != 0 || breg != 0)					\
  	{ int scale = 1;						\
  	  if (breg == 0)						\
-- 
Mike Haertel					mike at wheaties.ai.mit.edu
			In Hell they run VMS.



More information about the Unix-pc.general mailing list