make OSR5 compile again. - build failure on '0429 on i586-pc-sco3.2v5.0.2

Robert Lipe robertlipe@usa.net
Mon May 6 07:30:00 GMT 2002


rbrown64@csc.com.au wrote:
> Builds of 3.1 20020429 failed compiling gcc/rtl.c on i586-pc-sco3.2v5.0.2
> configured with and without gas. The missing symbols were provided by
> gcc/config/i386/i386.h - should it have been added to the HEADERS list?
> 
> Finger pointing at  Robert's patch. (I'll try reverting it).

Grrr.  Without those two includes, we get a cascade of errors as
described.  With those two includes, two different compilers choke when
building gengenrtl.o.

Bootstrapping the compiler
make CC="/bin/cc" libdir=/usr/local/lib LANGUAGES="c " \
        CFLAGS="-g " MAKEINFO="/play/gcc-3.1/missing makeinfo " \
        MAKEINFOFLAGS=""
/bin/cc -c -DIN_GCC    -g    -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I/play
/gcc-3.1/gcc -I/play/gcc-3.1/gcc/. -I/play/gcc-3.1/gcc/config -I/play/gcc-3.1/gc
c/../include /play/gcc-3.1/gcc/gengenrtl.c -o gengenrtl.o
"/play/gcc-3.1/gcc/config/i386/i386.h", line 53: error: (struct) tag redeclared:
 processor_costs
"/play/gcc-3.1/gcc/config/i386/i386.h", line 94: error: identifier redeclared: i
x86_cost
"/play/gcc-3.1/gcc/config/i386/i386.h", line 396: error: (enum) tag redeclared:
processor_type
"/play/gcc-3.1/gcc/config/i386/i386.h", line 397: error: identifier redeclared:
PROCESSOR_I386
"/play/gcc-3.1/gcc/config/i386/i386.h", line 398: error: identifier redeclared:
PROCESSOR_I486
"/play/gcc-3.1/gcc/config/i386/i386.h", line 399: error: identifier redeclared:
PROCESSOR_PENTIUM
"/play/gcc-3.1/gcc/config/i386/i386.h", line 400: error: identifier redeclared:
PROCESSOR_PENTIUMPRO
[ Billions more ] 

Or the same build with icc, an edgfe based compiler:

"/play/gcc-3.1/gcc/config/i386/i386.h", line 53: error: "processor_costs" has
          already been declared in the current scope
  struct processor_costs {
         ^

"/play/gcc-3.1/gcc/config/i386/i386.h", line 94: error: declaration is
          incompatible with "const struct processor_costs *ix86_cost"
          (declared at line 94)
  extern const struct processor_costs *ix86_cost;
                                       ^

"/play/gcc-3.1/gcc/config/i386/i386.h", line 395: error: "processor_type" has
          already been declared in the current scope
  enum processor_type
       ^

"/play/gcc-3.1/gcc/config/i386/i386.h", line 397: error: "PROCESSOR_I386" has
          already been declared in the current scope
    PROCESSOR_I386,                     /* 80386 */
    ^

"/play/gcc-3.1/gcc/config/i386/i386.h", line 398: error: "PROCESSOR_I486" has
          already been declared in the current scope
    PROCESSOR_I486,                     /* 80486DX, 80486SX, 80486DX[24] */
[ Likewise ]

Actually, gcc itself doesn't like this:

In file included from /play/gcc-3.1/gcc/config/i386/sco5.h:23,
                 from hconfig.h:20,
                 from /play/gcc-3.1/gcc/gengenrtl.c:22:
/play/gcc-3.1/gcc/config/i386/i386.h:53: redefinition of `struct processor_costs
'
/play/gcc-3.1/gcc/config/i386/i386.h:396: redeclaration of `enum processor_type'
/play/gcc-3.1/gcc/config/i386/i386.h:397: conflicting types for `PROCESSOR_I386'
/play/gcc-3.1/gcc/config/i386/i386.h:397: previous declaration of `PROCESSOR_I38
6'
/play/gcc-3.1/gcc/config/i386/i386.h:398: conflicting types for `PROCESSOR_I486'
/play/gcc-3.1/gcc/config/i386/i386.h:398: previous declaration of `PROCESSOR_I48
6'
/play/gcc-3.1/gcc/config/i386/i386.h:399: conflicting types for `PROCESSOR_PENTI
UM'
/play/gcc-3.1/gcc/config/i386/i386.h:399: previous declaration of `PROCESSOR_PEN
TIUM'


So I don't know what to do with all this.  Perhaps someone that actually
understands the i386 include scheme can help sort this out.  Machine
cycles I can spare, but I won't have time to divine intent this week.

RJL




> 
> >2002-04-23  Robert Lipe  <robertlipe@usa.net>
> 
> >            * config/i386/sco5.h (i386.h, att.h): Eliminate double
> inclusion.
> 
> >--- sco5.h_     Tue Apr 23 16:42:04 2002
> >+++ sco5.h      Tue Apr 23 11:54:13 2002
> >@@ -20,9 +20,6 @@
> > the Free Software Foundation, 59 Temple Place - Suite 330,
> > Boston, MA 02111-1307, USA.  */
> >
> >-#include "i386/i386.h" /* Base i386 target definitions */
> >-#include "i386/att.h"  /* Use AT&T i386 assembler syntax */
> >-
> > #undef TARGET_VERSION
> > #define TARGET_VERSION fprintf (stderr, " (i386, SCO OpenServer 5
> Syntax)");
> 
> --- gcc-20020429.chk.as/build.log   2002-05-06 13:19:57.000000000 +1000
> +++ gcc-20020429.chk/build.log      2002-05-01 00:55:09.000000000 +1000
> ...
>  Bootstrapping the compiler
> -make[1]: Entering directory `/users/rdb/src/gcc-20020429.chk.as/gcc'
> +make[1]: Entering directory `/users/rdb/src/gcc-20020429.chk/gcc'
>  /usr/local/bin/make CC="gcc" libdir=/usr/local/lib LANGUAGES="c " \
>       CFLAGS="-g " MAKEINFO="/users/rdb/src/gcc-20020429/missing makeinfo "
> \
>       MAKEINFOFLAGS=""
> -make[2]: Entering directory `/users/rdb/src/gcc-20020429.chk.as/gcc'
> -HEADERS="auto-host.h ansidecl.h  i386/sco5.h defaults.h" DEFINES="POSIX" \
> +make[2]: Entering directory `/users/rdb/src/gcc-20020429.chk/gcc'
> +HEADERS="auto-host.h ansidecl.h  usegas.h i386/sco5.h defaults.h" DEFINES
> ="POSIX" \
>  TARGET_CPU_DEFAULT="TARGET_CPU_DEFAULT_pentium" \
>  /bin/sh ../../gcc-20020429/gcc/mkconfig.sh config.h
> -HEADERS="auto-host.h ansidecl.h  i386/sco5.h defaults.h" DEFINES="POSIX" \
> +HEADERS="auto-host.h ansidecl.h  usegas.h i386/sco5.h defaults.h" DEFINES
> ="POSIX" \
>  TARGET_CPU_DEFAULT="TARGET_CPU_DEFAULT_pentium" \
>  /bin/sh ../../gcc-20020429/gcc/mkconfig.sh hconfig.h
>  gcc -c -DIN_GCC    -g  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H
> -DGENERATOR_FILE    -I. -I. -I../../gcc-20020429/gcc -I../../gcc-20020429/gcc/. -I../../gcc-20020429/gcc/config -I../../gcc-20020429/gcc/../include
> ../../gcc-20020429/gcc/gengenrtl.c -o gengenrtl.o
> @@ -718,7 +718,7 @@
>  ../../gcc-20020429/gcc/rtl.c:486: for each function it appears in.)
>  ../../gcc-20020429/gcc/rtl.c:488: `BIGGEST_ALIGNMENT' undeclared (first use in this function)
>  make[2]: *** [rtl.o] Error 1
> -make[2]: Leaving directory `/users/rdb/src/gcc-20020429.chk.as/gcc'
> +make[2]: Leaving directory `/users/rdb/src/gcc-20020429.chk/gcc'
>  make[1]: *** [stage1_build] Error 2
> 
> 
> 
> gcc -c -DIN_GCC    -g  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H
> -DGENERATOR_FILE    -I. -I. -I../../gcc-20020429/gcc -I../../gcc-20020429/gcc/. -I../../gcc-20020429/gcc/config -I../../gcc-20020429/gcc/../include
> ../../gcc-20020429/gcc/rtl.c -o rtl.o
> In file included from ../../gcc-20020429/gcc/rtl.c:24:
> ../../gcc-20020429/gcc/rtl.h:1542: warning: ISO C forbids forward references to `enum' types
> ../../gcc-20020429/gcc/rtl.h:1543: warning: ISO C forbids forward references to `enum' types
> In file included from ../../gcc-20020429/gcc/rtl.c:24:
> ../../gcc-20020429/gcc/rtl.h:1961: warning: ISO C forbids forward references to `enum' types
> ../../gcc-20020429/gcc/rtl.h:1961: warning: ISO C forbids forward references to `enum' types
> ../../gcc-20020429/gcc/rtl.h:1961: warning: parameter has incomplete type
> ../../gcc-20020429/gcc/rtl.h:1961: warning: parameter has incomplete type
> ../../gcc-20020429/gcc/rtl.h:1962: warning: ISO C forbids forward references to `enum' types
> ../../gcc-20020429/gcc/rtl.h:1962: warning: ISO C forbids forward references to `enum' types
> ../../gcc-20020429/gcc/rtl.h:1962: warning: parameter has incomplete type
> ../../gcc-20020429/gcc/rtl.h:1962: warning: parameter has incomplete type
> In file included from ../../gcc-20020429/gcc/rtl.c:142:
> ../../gcc-20020429/gcc/machmode.def:77: `BITS_PER_UNIT' undeclared here (not in a function)
> ../../gcc-20020429/gcc/machmode.def:77: initializer element is not constant
> ../../gcc-20020429/gcc/machmode.def:77: (near initialization for `mode_bitsize[2]')
> ...
> ../../gcc-20020429/gcc/machmode.def:159: `BITS_PER_UNIT' undeclared here (not in a function)
> ../../gcc-20020429/gcc/machmode.def:159: initializer element is not constant
> ../../gcc-20020429/gcc/machmode.def:159: (near initialization for `mode_mask_array[52]')
> ../../gcc-20020429/gcc/rtl.c: In function `get_mode_alignment':
> ../../gcc-20020429/gcc/rtl.c:486: `BITS_PER_UNIT' undeclared (first use in this function)
> ../../gcc-20020429/gcc/rtl.c:486: (Each undeclared identifier is reported only once
> ../../gcc-20020429/gcc/rtl.c:486: for each function it appears in.)
> ../../gcc-20020429/gcc/rtl.c:488: `BIGGEST_ALIGNMENT' undeclared (first use in this function)
> 
> 
> --- gcc-20020429.chk.as/config.status     2002-05-06 13:06:17.000000000 +1000
> +++ gcc-20020429.chk/config.status  2002-05-01 00:50:01.000000000 +1000
> @@ -1,5 +1,5 @@
>  #!/bin/sh
>  # This file was generated automatically by configure.  Do not edit.
>  # This directory was configured as follows:
> -../gcc-20020429/configure --with-gcc-version-trigger=/users/rdb/src/gcc-20020429/gcc/version.c --host=i586-pc-sco3.2v5.0.2 --enable-checking
> --with-as=/usr/bin/as --norecursion
> +../gcc-20020429/configure --with-gcc-version-trigger=/users/rdb/src/gcc-20020429/gcc/version.c --host=i586-pc-sco3.2v5.0.2 --enable-checking
> --with-gnu-as --with-as=/usr/local/bin/as --norecursion
>  # using "mh-frag"
> 



More information about the Gcc-bugs mailing list