PATCH to dwarfout.c to bring gcc to bootstrapland

Gabriel Dos Reis Gabriel.Dos-Reis@cmla.ens-cachan.fr
Wed Dec 29 21:16:00 GMT 1999


Martin,

Your change

1999-12-29  "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>

        Restore i386 binary compatibility in Dwarf EH info.
        * config/i386/i386.h (DWARF_FRAME_REGISTERS): Define as 17,
        * the old
        value of FIRST_PSEUDO_REGISTER.
        * frame.h (DWARF_FRAME_REGISTERS): Default to
        * FIRST_PSEUDO_REGISTER.
        (struct frame_state): Use DWARF_FRAME_REGISTERS.
        * dwarfout.c (output_reg_number): Ditto.
        * dwarf2out.c (reg_number,
        * expand_builtin_init_dwarf_reg_sizes): Ditto.
        (DWARF_FRAME_RETURN_COLUMN): Default to DWARF_FRAME_REGISTERS.

makes gcc unbootstrappable.  The problem is that you changed
FIRST_PSEUDO_REGISTER to DWARF_FRAME_REGISTERS in frame.h, but failed
to #include "frame.h".

The following patch brings gcc to bootstrapland.

OK?

-- Gaby

1999-12-30  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>

        * dwarfout.c: Include "frame.h"
        * dwarf2out.c: Likewise.
        * Makefile.in (dwarfout.o): Depend on frame.h
        (dwarf2out.o): Likewise.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.356
diff -p -r1.356 Makefile.in
*** Makefile.in	1999/12/24 14:04:53	1.356
--- Makefile.in	1999/12/30 05:15:16
*************** stor-layout.o : stor-layout.c $(CONFIG_H
*** 1465,1471 ****
  fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
     $(RTL_H) ggc.h
  diagnostic.o : $(CONFIG_H) system.h $(TREE_H) $(RTL_H) tm_p.h flags.h \
!    input.h insn-attr.h insn-codes.h insn-config.h toplev.h intl.h
  toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) function.h \
     flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
     insn-codes.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h dwarfout.h \
--- 1465,1471 ----
  fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
     $(RTL_H) ggc.h
  diagnostic.o : $(CONFIG_H) system.h $(TREE_H) $(RTL_H) tm_p.h flags.h \
!    input.h insn-attr.h insn-codes.h insn-config.h toplev.h intl.h 
  toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) function.h \
     flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
     insn-codes.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h dwarfout.h \
*************** sdbout.o : sdbout.c $(CONFIG_H) system.h
*** 1519,1529 ****
     insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
     sdbout.h toplev.h
  dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
!    flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
  dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
     flags.h insn-config.h reload.h output.h defaults.h \
     hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h dyn-string.h \
!    ggc.h except.h
  xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
     flags.h toplev.h output.h dbxout.h ggc.h
  emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
--- 1519,1530 ----
     insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
     sdbout.h toplev.h
  dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
!    flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h \
!    frame.h
  dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
     flags.h insn-config.h reload.h output.h defaults.h \
     hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h dyn-string.h \
!    ggc.h except.h frame.h
  xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
     flags.h toplev.h output.h dbxout.h ggc.h
  emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
Index: dwarfout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarfout.c,v
retrieving revision 1.47
diff -p -r1.47 dwarfout.c
*** dwarfout.c	1999/12/30 03:44:12	1.47
--- dwarfout.c	1999/12/30 05:15:16
*************** Boston, MA 02111-1307, USA.  */
*** 35,40 ****
--- 35,41 ----
  #include "dwarfout.h"
  #include "toplev.h"
  #include "tm_p.h"
+ #include "frame.h"
  
  #if defined(DWARF_TIMESTAMPS)
  #if !defined(POSIX)
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.136
diff -p -r1.136 dwarf2out.c
*** dwarf2out.c	1999/12/30 03:44:12	1.136
--- dwarf2out.c	1999/12/30 05:15:17
*************** Boston, MA 02111-1307, USA.  */
*** 55,60 ****
--- 55,61 ----
  #include "toplev.h"
  #include "dyn-string.h"
  #include "ggc.h"
+ #include "frame.h"
  
  /* We cannot use <assert.h> in GCC source, since that would include
     GCC's assert.h, which may not be compatible with the host compiler.  */


More information about the Gcc-patches mailing list