[gnu.gcc.bug] GCC 1.33 for Alliant

weening@GANG-OF-FOUR.STANFORD.EDU (Joe Weening) (02/03/89)

I've been playing with a pre-release of GCC 1.33 on the Alliant for
the past few days, and would like to offer a few suggestions to any
others out there who are willing to try it.  First of all, it is not
bug-free at this point but should be able to compile itself with a bit
of help, as well as many other programs.  Somehow a change slipped in
between the pre-release and the released version 1.33, which breaks
the compilation of final.c.  The following patch fixes it:

*** tm-alliant.h.orig	Wed Feb  1 17:18:21 1989
--- tm-alliant.h	Thu Feb  2 16:52:28 1989
***************
*** 1289,1293 ****
          fprintf (FILE, "#0r%.9g", u1.f);				\
        else								\
!         fprintf (FILE, "#0x%x", u1.i[0]); }				\
    else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode)	\
      { union { double d; int i[2]; } u;					\
--- 1289,1293 ----
          fprintf (FILE, "#0r%.9g", u1.f);				\
        else								\
!         fprintf (FILE, "#0x%x", u1.i); }				\
    else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode)	\
      { union { double d; int i[2]; } u;					\

The main problem you will encounter when bootstrapping GCC is that
cccp.c does not compile correctly (assemble, actually) with the
Alliant C compiler.  Using /lib/cpp in place of it will probably work
but is undesirable.  Here is the procedure I am using to build GCC,
after applying the patch shown above:

    % config.gcc alliant
    % make -k

You will get lots of compiler warnings, which can be ignored.  The -k
is so that make doesn't stop when the compilation of cccp.c causes
assembly errors.  This will result in a cpp that is no good.  (It gets
into infinite loops.)  The next steps fix this.

    % make stage1
    % rm -f stage1/cpp
    % ln -s /lib/cpp stage1/cpp
    % make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" cpp

Ignore the messages "0: unknown flag -undef" which come from /lib/cpp.

    % rm -f stage1/cpp
    % mv cpp stage1
    % make clean

    % make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"

You now should have a working compiler.  To check it,

    % make stage2
    % make CC=stage2/gcc CFLAGS="-g -O -Bstage2/"

The .o files in the top-level directory and in the stage2 directory
will not be identical, as they are on other systems, because the
Alliant .o format includes the time of file creation.  Other than
that, they should agree.

    % su
    # make install

I have been using the C compiler (pcc) that came with Concentrix 4.0;
your mileage may vary with other versions.

rms@WHEATIES.AI.MIT.EDU (Richard Stallman) (02/03/89)

I don't know what bug you mean, but that patch is certainly wrong!
Do you seriously mean to print out the ADDRESS of the array of
two integers?

rms@WHEATIES.AI.MIT.EDU (Richard Stallman) (02/03/89)

That patch is right after all.  Sorry.

pwolfe@kailand.kai.com (Patrick Wolfe) (02/10/89)

/*
 * The main problem you will encounter when bootstrapping GCC is that
 * cccp.c does not compile correctly (assemble, actually) with the
 * Alliant C compiler.
 */

If you use the "-ce" command line option, it works fine.


-- 

        Patrick Wolfe			System Manager, Kuck & Associates, Inc
	pat@kai.com			{uunet,uiucuxc}!kailand!pat
	pat%kai.com@uxc.cso.uiuc.edu	pat%kai.com@uiucuxc.arpa