🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #157

Successful compiles of GCC 2.1 on IBM/RT(AOS 4.3) and HP9000/340(hpux7)

#157
From: Tim Irvin
Date: Mon, 06 Apr 1992 21:50
209 lines
8102 bytes
I have successfully compiled GCC 2.1 on our IBM PC/RTs running AOS 4.3.

Here are my notes:

1. Configured it with rtpc-aos4.3

2. No problems on the first stage (except of course the oodles of warnings from
   the hc compiler).

3. During the stage 2 compile I got the following error:
      stage1/gcc -c    -g -O -Bstage1/     -I. -I. -I./config  `echo ./cp-parse.c | sed 's,^\./,,'`
      bison.simple: In function `yyparse':
      bison.simple:625: virtual memory exhausted
      *** Exit 1

      Stop.

   This also happened while compiling GCC 2.0, the solution is to
   "unlimit datasize" and continue.

   During the second stage I also got the following warnings:
      In file included from /usr/include/string.h:21, from cp-lex.c:28:
      /usr/include/strings.h:31: warning: conflicting types for built-in function `strlen'
      In file included from /usr/include/string.h:21, from cp-method.c:29:
      /usr/include/strings.h:31: warning: conflicting types for built-in function `strlen'
      In file included from cp-xref.c:34:
      /usr/include/strings.h:31: warning: conflicting types for built-in function `strlen'

    Line 31 of /usr/include/strings.h reads:

      int     strlen();

    This didn't seem to have any adverse effect though, so I continued.

4. During the stage 3 compile, I again got the above warnings.  I ignored them
   and continued.

5. During the "make CC=stage2/gcc install", I got the following error:

      if [ -d /usr/local/lib ] ; then true ; else mkdir /usr/local/lib ; fi
      if [ -d /usr/local/lib/gcc-lib ] ; then true ; else mkdir /usr/local/lib/gcc-lib ; fi
      *** Exit 1

      Stop.

   This is a bug in the RT's make program.  It got the false for the second if
   and died.  The solution was to use the GNU make program.  This problem
   was more prolific in V2.0, so I'm assuming you must have been fixing the
   Makefile, but just missed a couple of spots.

6. While making/installing collect2, I got the following error:
      stage2/gcc -O    -g     -I. -I. -I./config  -DSTANDARD_STARTFILE_PREFIX=\"/usr/local/lib/\"  -DSTANDARD_BIN_PREFIX=\"/usr/local/bin/\"  -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-lib/\"  -DDEFAULT_TARGET_MACHINE=\"rtpc-aos4.3\"  -c `echo .  /collect2.c | sed 's,^\./,,'`
      In file included from /usr/include/string.h:21, from collect2.c:31:
      /usr/include/strings.h:31: warning: conflicting types for built-in function `strlen'

      stage2/gcc -O    -g   -o collect2 collect2.o version.o obstack.o ` case "stage2/gcc -O" in "cc") echo  ;; esac `
      Undefined:
      _vfprintf
      _.vfprintf
      *** Exit 1

      Stop.

   The first part I ignored.  The second error was a problem in GCC 2.0 also,
   I created a file vfprintf.c with the following code in it (that someone
   passed on to me during the 2.0 build stage):

------------ Cut here
#include <stdio.h>
vfprintf(stream,fmt,args)
FILE *stream;
char *fmt,*args[];
{
        return(fprintf(stream,fmt,args[0],args[1],args[2],args[3],args[4],
                                  args[5],args[6],args[7],args[8],args[9],
                                  args[10]));
}
------------ Cut here

   and I edited the Makefile.  The diff is below:

------------ Cut here
*** Makefile.old        Mon Apr  6 13:16:25 1992
--- Makefile    Mon Apr  6 13:11:03 1992
***************
*** 684,691 ****
  cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h

! collect2 : collect2.o version.o $(LIBDEPS)
!       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)

  collect2.o : collect2.c $(CONFIG_H) gstab.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
--- 684,693 ----
  cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h

! collect2 : collect2.o version.o vfprintf.o $(LIBDEPS)
!       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o vfprintf
.o $(LIBS)
!
! vfprintf.o : vfprintf.c

  collect2.o : collect2.c $(CONFIG_H) gstab.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \

------------ Cut here


I have also successfully compiled GCC 2.1 on our HP 9000/340s running HP/UX 7.0.

Here are my notes:

1. configured with hp9k340

2. Stage 1 compile, I got the following error:

        cc -Wc,-Nw2000 -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 -c    -g     -I. -I. -I./config ./genattrtab.c
"./genattrtab.c", line 399: operands of + have incompatible types
"./genattrtab.c", line 419: operands of + have incompatible types
"./genattrtab.c", line 439: operands of + have incompatible types
"./genattrtab.c", line 459: operands of + have incompatible types
*** Error code 1

Stop.

   The following patch worked:

------------ Cut Here
Wed Apr  1 06:52:35 1992  Richard Kenner  (kenner at vlsi1.ultra.nyu.edu)

        * genattrtab.c (attr_rtx): Add some casts to int from enum rtx_code.

*** genattrtab.c.old    Tue Mar 31 08:12:46 1992
--- genattrtab.c        Wed Apr  1 20:42:15 1992
*************** attr_rtx (va_alist)
*** 397,401 ****
        rtx arg0 = va_arg (p, rtx);

!       hashcode = (code + RTL_HASH (arg0));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
--- 397,401 ----
        rtx arg0 = va_arg (p, rtx);

!       hashcode = ((int) code + RTL_HASH (arg0));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
*************** attr_rtx (va_alist)
*** 417,421 ****
        rtx arg1 = va_arg (p, rtx);

!       hashcode = (code + RTL_HASH (arg0) + RTL_HASH (arg1));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
--- 417,421 ----
        rtx arg1 = va_arg (p, rtx);

!       hashcode = ((int) code + RTL_HASH (arg0) + RTL_HASH (arg1));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
*************** attr_rtx (va_alist)
*** 437,441 ****
        char * arg0 = va_arg (p, char *);

!       hashcode = (code + RTL_HASH (arg0));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
--- 437,441 ----
        char * arg0 = va_arg (p, char *);

!       hashcode = ((int) code + RTL_HASH (arg0));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
*************** attr_rtx (va_alist)
*** 457,461 ****
        char * arg1 = va_arg (p, char *);

!       hashcode = (code + RTL_HASH (arg0) + RTL_HASH (arg1));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode
--- 457,461 ----
        char * arg1 = va_arg (p, char *);

!       hashcode = ((int) code + RTL_HASH (arg0) + RTL_HASH (arg1));
        for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next)
        if (h->hashcode == hashcode

------------ Cut Here

3. Stage 2 and Stage 3: no problems

4. Install and on: on problems


Note:
   In both of the above compiles I made the following minor changes to the
   Makefile prior to the build:

   1. changed mandir to ./man/man1
   2. changed INSTALL to a) "/usr/bin/install -c" on the RT and
                         b) "cp" on the HP


Tim Irvin
Systems Administrator
Project NORTHSTAR
Dartmouth College
Technical Details
Message-ID: <9204062150.AA07544@northstar.dartmouth.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!betelgeuse.dartmouth.edu!irvin

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!betelgeuse.dartmouth.edu!irvin
From: irvin@betelgeuse.dartmouth.edu (Tim Irvin)
Subject: Successful compiles of GCC 2.1 on IBM/RT(AOS 4.3) and HP9000/340(hpux7)
Message-ID: <9204062150.AA07544@northstar.dartmouth.edu>
Sender: gnulists@ai.mit.edu
Reply-To: irvin@northstar.dartmouth.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 6 Apr 1992 21:50:23 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 210