This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mn10200-elf won't build


On Mon, 23 Aug 1999, Jim Wilson wrote:

> gcc -DCROSS_COMPILE -DIN_GCC   -DMULTIBYTE_CHARS=1 -DSVR4  -g -O2   -DHAVE_CONFIG_H    -I. -I/home/testomat/nightly/devo/gcc -I/home/testomat/nightly/devo/gcc/config -I/home/testomat/nightly/devo/gcc/../include -c insn-emit.c
> insn-emit.c: In function `gen_addsi3':
> insn-emit.c:257: `rtx_equal_function_value_matters' undeclared (first use in this function)
> insn-emit.c:257: (Each undeclared identifier is reported only once
> insn-emit.c:257: for each function it appears in.)

[Jim also reported a v850 build failure]

The mn10200 problem is due to the fact that rtx_equal_function_value_matters
is declared in no header file, it's declared extern in all C files that use
it.  Fixed by the patch below (I didn't change all the port specific files
yet).

The v850 problem is caused by my attempts to avoid including function.h in
target files that don't need it - this has caused quite a few problems
despite the fact that I tried to either build a compiler or add function.h in
each port.  I've given up on that, put on my brown paper bag and added the
necessary includes everywhere.

I've committed this patch as an obvious bug fix.

Bernd

	* tree.h (current_function_calls_setjmp,
 	current_function_calls_longjmp): Delete declarations.
	* dsp16xx.c: Include "function.h".
	* elxsi.c: Likewise.
	* gmicro.c: Likewise.
	* h8300.c: Likewise.
	* i370.c: Likewise.
	* m32r.c: Likewise.
	* mn10200.c: Likewise.
	* mn10300.c: Likewise.
	* ns32k.c: Likewise.
	* spur.c: Likewise.
	* v850.c: Likewise.

	* rtl.h (rtx_equal_function_value_matters): Declare.
	* toplev.c (rtx_equal_function_value_matters): Don't declare.
	* cse.c: Likewise.
	* function.c: Likewise.
	* emit-rtl.c: Likewise.

Index: tree.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/tree.h,v
retrieving revision 1.78
diff -u -p -r1.78 tree.h
--- tree.h	1999/08/19 22:33:38	1.78
+++ tree.h	1999/08/24 11:51:32
@@ -1940,14 +1940,6 @@ extern int immediate_size_expand;
 
 extern tree current_function_decl;
 
-/* Nonzero if function being compiled can call setjmp.  */
-
-extern int current_function_calls_setjmp;
-
-/* Nonzero if function being compiled can call longjmp.  */
-
-extern int current_function_calls_longjmp;
-
 /* Nonzero means all ..._TYPE nodes should be allocated permanently.  */
 
 extern int all_types_permanent;
Index: rtl.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/rtl.h,v
retrieving revision 1.118
diff -u -p -r1.118 rtl.h
--- rtl.h	1999/08/24 03:28:55	1.118
+++ rtl.h	1999/08/24 11:51:32
@@ -818,6 +818,12 @@ extern const char * const note_insn_name
 /* For a NOTE_INSN_LIVE note, the original basic block number.  */
 #define RANGE_LIVE_ORIG_BLOCK(INSN) (XINT (INSN, 1))
 
+/* Nonzero if we need to distinguish between the return value of this function
+   and the return value of a function called by this function.  This helps
+   integrate.c.
+   This is 1 until after the rtl generation pass.  */
+extern int rtx_equal_function_value_matters;
+
 /* Generally useful functions.  */
 
 /* The following functions accept a wide integer argument.  Rather than
Index: toplev.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v
retrieving revision 1.194
diff -u -p -r1.194 toplev.c
--- toplev.c	1999/08/24 03:28:56	1.194
+++ toplev.c	1999/08/24 11:51:34
@@ -137,8 +137,6 @@ You Lose!  You must define PREFERRED_DEB
 #define DIR_SEPARATOR '/'
 #endif
 
-extern int rtx_equal_function_value_matters;
-
 #if ! (defined (VMS) || defined (OS2))
 extern char **environ;
 #endif
Index: cse.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cse.c,v
retrieving revision 1.80
diff -u -p -r1.80 cse.c
--- cse.c	1999/08/20 23:05:07	1.80
+++ cse.c	1999/08/24 11:51:36
@@ -693,8 +693,6 @@ static void check_fold_consts	PROTO((PTR
 static struct cse_reg_info* get_cse_reg_info PROTO((int));
 static void free_cse_reg_info   PROTO((splay_tree_value));
 static void flush_hash_table	PROTO((void));
-
-extern int rtx_equal_function_value_matters;
 
 /* Dump the expressions in the equivalence class indicated by CLASSP.
    This function is used only for debugging.  */
Index: function.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/function.c,v
retrieving revision 1.97
diff -u -p -r1.97 function.c
--- function.c	1999/08/20 23:05:07	1.97
+++ function.c	1999/08/24 11:51:38
@@ -120,12 +120,6 @@ static int virtuals_instantiated;
 void (*save_machine_status) PROTO((struct function *));
 void (*restore_machine_status) PROTO((struct function *));
 
-/* Nonzero if we need to distinguish between the return value of this function
-   and the return value of a function called by this function.  This helps
-   integrate.c  */
-
-extern int rtx_equal_function_value_matters;
-
 /* The FUNCTION_DECL for an inline function currently being expanded.  */
 tree inline_function_decl;
 
Index: emit-rtl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/emit-rtl.c,v
retrieving revision 1.71
diff -u -p -r1.71 emit-rtl.c
--- emit-rtl.c	1999/08/20 23:05:07	1.71
+++ emit-rtl.c	1999/08/24 11:51:39
@@ -184,8 +184,6 @@ static rtx free_insn;
 #define last_filename (current_function->emit->x_last_filename)
 #define first_label_num (current_function->emit->x_first_label_num)
 
-extern int rtx_equal_function_value_matters;
-
 static rtx make_jump_insn_raw		PROTO((rtx));
 static rtx make_call_insn_raw		PROTO((rtx));
 static rtx find_line_note		PROTO((rtx));
Index: config/dsp16xx/dsp16xx.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/dsp16xx/dsp16xx.c,v
retrieving revision 1.5
diff -u -p -r1.5 dsp16xx.c
--- dsp16xx.c	1999/01/27 01:43:03	1.5
+++ dsp16xx.c	1999/08/24 11:51:39
@@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-attr.h"
 #include "tree.h"
 #include "expr.h"
+#include "function.h"
 #include "flags.h"
 
 char *text_seg_name;
Index: config/elxsi/elxsi.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/elxsi/elxsi.c,v
retrieving revision 1.2
diff -u -p -r1.2 elxsi.c
--- elxsi.c	1998/12/16 21:02:36	1.2
+++ elxsi.c	1999/08/24 11:51:39
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include <stdio.h>
 #include "rtl.h"
+#include "function.h"
 
 extern char *reg_names[];
 rtx cmp_op0=0, cmp_op1=0;
Index: config/gmicro/gmicro.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/gmicro/gmicro.c,v
retrieving revision 1.4
diff -u -p -r1.4 gmicro.c
--- gmicro.c	1999/08/20 22:32:54	1.4
+++ gmicro.c	1999/08/24 11:51:40
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA.  */
 #include "conditions.h"
 #include "insn-flags.h"
 #include "output.h"
+#include "function.h"
 #include "insn-attr.h"
 
 mypr (s, a1, a2, a3, a4, a5)
Index: config/h8300/h8300.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/h8300/h8300.c,v
retrieving revision 1.16
diff -u -p -r1.16 h8300.c
--- h8300.c	1999/04/07 23:17:52	1.16
+++ h8300.c	1999/08/24 11:51:40
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include <stdio.h>
 #include "rtl.h"
+#include "tree.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "real.h"
@@ -35,7 +36,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
-#include "tree.h"
+#include "function.h"
 #include "obstack.h"
 
 /* Forward declarations.  */
Index: config/i370/i370.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i370/i370.c,v
retrieving revision 1.3
diff -u -p -r1.3 i370.c
--- i370.c	1999/07/19 19:26:30	1.3
+++ i370.c	1999/08/24 11:51:41
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-flags.h"
 #include "output.h"
 #include "insn-attr.h"
+#include "function.h"
 #include "flags.h"
 #include "recog.h"
 #include <time.h>
Index: config/m32r/m32r.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m32r/m32r.c,v
retrieving revision 1.13
diff -u -p -r1.13 m32r.c
--- m32r.c	1999/08/02 23:08:48	1.13
+++ m32r.c	1999/08/24 11:51:41
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-attr.h"
 #include "flags.h"
 #include "expr.h"
+#include "function.h"
 #include "recog.h"
 
 /* Save the operands last given to a compare for use when we
Index: config/mn10200/mn10200.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mn10200/mn10200.c,v
retrieving revision 1.7
diff -u -p -r1.7 mn10200.c
--- mn10200.c	1999/07/28 18:21:02	1.7
+++ mn10200.c	1999/08/24 11:51:41
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include <stdio.h>
 #include "rtl.h"
+#include "tree.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "real.h"
@@ -33,7 +34,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
-#include "tree.h"
+#include "function.h"
 #include "obstack.h"
 
 /* Global registers known to hold the value zero.
Index: config/mn10300/mn10300.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.16
diff -u -p -r1.16 mn10300.c
--- mn10300.c	1999/07/28 18:23:04	1.16
+++ mn10300.c	1999/08/24 11:51:42
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include <stdio.h>
 #include "rtl.h"
+#include "tree.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "real.h"
@@ -33,7 +34,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
-#include "tree.h"
+#include "function.h"
 #include "obstack.h"
 
 /* The size of the callee register save area.  Right now we save everything
Index: config/ns32k/ns32k.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/ns32k/ns32k.c,v
retrieving revision 1.6
diff -u -p -r1.6 ns32k.c
--- ns32k.c	1999/08/20 23:05:24	1.6
+++ ns32k.c	1999/08/24 11:51:42
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA.  */
 #include "output.h"
 #include "insn-attr.h"
 #include "tree.h"
+#include "function.h"
 #include "expr.h"
 #include "flags.h"
 
Index: config/spur/spur.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/spur/spur.c,v
retrieving revision 1.3
diff -u -p -r1.3 spur.c
--- spur.c	1998/12/16 21:14:04	1.3
+++ spur.c	1999/08/24 11:51:42
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA.  */
 #include "conditions.h"
 #include "insn-flags.h"
 #include "output.h"
+#include "function.h"
 #include "insn-attr.h"
 
 static rtx find_addr_reg ();
Index: config/v850/v850.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/v850/v850.c,v
retrieving revision 1.17
diff -u -p -r1.17 v850.c
--- v850.c	1999/08/09 14:00:14	1.17
+++ v850.c	1999/08/24 11:51:42
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
+#include "function.h"
 #include "obstack.h"
 #include "toplev.h"
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]