🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2225

GCC 1.33 for Alliant

#2225
From: Joe Weening
Date: Fri, 03 Feb 1989 01:23
66 lines
2981 bytes
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.
Technical Details
Message-ID: <8902030123.AA02451@Gang-of-Four.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!xanth!ames!mailrus!tut.cis.ohio-state.edu!GANG-OF-FOUR.STANFORD.EDU!weening

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!xanth!ames!mailrus!tut.cis.ohio-state.edu!GANG-OF-FOUR.STANFORD.EDU!weening
From: weening@GANG-OF-FOUR.STANFORD.EDU (Joe Weening)
Newsgroups: gnu.gcc.bug
Subject: GCC 1.33 for Alliant
Message-ID: <8902030123.AA02451@Gang-of-Four.Stanford.EDU>
Date: 3 Feb 89 01:23:09 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 66