This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: fix mips-sgi-irix6.5 bootstrap failure in bt-load.c
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 22 Jun 2003 13:51:54 -0400 (EDT)
- Subject: Patch: fix mips-sgi-irix6.5 bootstrap failure in bt-load.c
When bootstrapping on mips-sgi-irix6.5, during stage2 I get:
> stage1/xgcc -Bstage1/ -B/usr/local/mips-sgi-irix6.5/bin/ -c -g -O2
> -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -pedantic -Wno-long-long -Werror -fno-common
> -DHAVE_CONFIG_H -I. -I. -I../../egcc-CVS20030622/gcc
> -I../../egcc-CVS20030622/gcc/. -I../../egcc-CVS20030622/gcc/config
> -I../../egcc-CVS20030622/gcc/../include
> ../../egcc-CVS20030622/gcc/bt-load.c -o bt-load.o
>
> bt-load.c: In function `find_btr_reference':
> bt-load.c:199: warning: implicit declaration of function `mips_hard_regno_nregs'
> make[2]: *** [bt-load.o] Error 1
This is because bt-load.c calls HARD_REGNO_NREGS which is defined in
terms of mips_hard_regno_nregs() on mips platforms. Fixed with the
patch below:
Ok for mainline?
Thanks,
--Kaveh
2003-06-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (bt-load.o): Depend on $(TM_P_H).
* bt-load.c: Include "tm_p.h".
diff -rup orig/egcc-CVS20030620/gcc/Makefile.in egcc-CVS20030620/gcc/Makefile.in
--- orig/egcc-CVS20030620/gcc/Makefile.in 2003-06-18 20:01:09.000000000 -0400
+++ egcc-CVS20030620/gcc/Makefile.in 2003-06-20 11:07:55.526994400 -0400
@@ -1727,7 +1727,7 @@ caller-save.o : caller-save.c $(CONFIG_H
flags.h $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \
$(RECOG_H) reload.h $(EXPR_H) toplev.h $(TM_P_H)
bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(BASIC_BLOCK_H) $(RTL_H) hard-reg-set.h $(REGS_H) $(OBSTACK_H) \
+ $(BASIC_BLOCK_H) $(RTL_H) hard-reg-set.h $(REGS_H) $(OBSTACK_H) $(TM_P_H) \
$(FIBHEAP_H) output.h $(TARGET_H) $(EXPR_H) flags.h $(INSN_ATTR_H)
reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) conditions.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(INSN_ATTR_H) except.h \
diff -rup orig/egcc-CVS20030620/gcc/bt-load.c egcc-CVS20030620/gcc/bt-load.c
--- orig/egcc-CVS20030620/gcc/bt-load.c 2003-06-19 20:01:15.000000000 -0400
+++ egcc-CVS20030620/gcc/bt-load.c 2003-06-20 11:07:54.127404000 -0400
@@ -36,6 +36,7 @@ Software Foundation, 59 Temple Place - S
#include "flags.h"
#include "insn-attr.h"
#include "function.h"
+#include "tm_p.h"
/* Target register optimizations - these are performed after reload. */