armv4l bootstrap problem in libstdc++-v3

Mark Mitchell mark@codesourcery.com
Wed Jan 10 15:58:00 GMT 2001


OK, fixed with this patch.  The problem *was* in the ARM back-end, in
a manner of speaking.  The C++ front-ends wants the TYPE_ARG_TYPES for
*all* functions that do not take variable numbers of argumenst to end
with `void_list_node' -- not an equivalent node.  (That's used to
marginally speed up things in the C++ front-end, and it saves memory.)

So, when making builtins you have to play along...

Bootstrapped, tested on i686-pc-linux-gnu.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2001-01-10  Mark Mitchell  <mark@codesourcery.com>

	* c-common.h (CTI_VOID_LIST): Remove.
	(void_list_node): Likewise.
	* tree.h (TI_VOID_LIST_NODE): New enumeral.
	(void_list_node): New macro.
	* config/arm/arm.c (arm_init_builtins): Use void_list_node.
	* config/i386/i386.c (ix86_init_builtins): Likewise.
	* config/ia64a/ia64.c (ia64_init_builtins): Likewise.

Index: c-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.h,v
retrieving revision 1.62
diff -c -p -r1.62 c-common.h
*** c-common.h	2001/01/04 23:53:51	1.62
--- c-common.h	2001/01/10 23:53:25
*************** enum c_tree_index
*** 143,149 ****
      CTI_C_BOOL_TRUE,
      CTI_C_BOOL_FALSE,
      CTI_DEFAULT_FUNCTION_TYPE,
-     CTI_VOID_LIST,
  
      CTI_VOID_FTYPE,
      CTI_VOID_FTYPE_PTR,
--- 143,148 ----
*************** enum c_tree_index
*** 192,198 ****
  #define const_string_type_node		c_global_trees[CTI_CONST_STRING_TYPE]
  
  #define default_function_type		c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
- #define void_list_node			c_global_trees[CTI_VOID_LIST]
  #define void_ftype			c_global_trees[CTI_VOID_FTYPE]
  #define void_ftype_ptr			c_global_trees[CTI_VOID_FTYPE_PTR]
  #define int_ftype_int			c_global_trees[CTI_INT_FTYPE_INT]
--- 191,196 ----
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.216
diff -c -p -r1.216 tree.h
*** tree.h	2001/01/09 10:54:00	1.216
--- tree.h	2001/01/10 23:53:28
*************** enum tree_index
*** 1739,1744 ****
--- 1739,1746 ----
    TI_PTRDIFF_TYPE,
    TI_VA_LIST_TYPE,
  
+   TI_VOID_LIST_NODE,
+ 
    TI_V4SF_TYPE,
    TI_V4SI_TYPE,
    TI_V8QI_TYPE,
*************** extern tree global_trees[TI_MAX];
*** 1792,1797 ****
--- 1794,1806 ----
  #define const_ptr_type_node		global_trees[TI_CONST_PTR_TYPE]
  #define ptrdiff_type_node		global_trees[TI_PTRDIFF_TYPE]
  #define va_list_type_node		global_trees[TI_VA_LIST_TYPE]
+ 
+ /* The node that should be placed at the end of a parameter list to
+    indicate that the function does not take a variable number of
+    arguments.  The TREE_VALUE will be void_type_node and there will be
+    no TREE_CHAIN.  Language-independent code should not assume
+    anything else about this node.  */
+ #define void_list_node                  global_trees[TI_VOID_LIST_NODE]
  
  #define main_identifier_node		global_trees[TI_MAIN_IDENTIFIER]
  #define MAIN_NAME_P(NODE) (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node)
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.134
diff -c -p -r1.134 arm.c
*** arm.c	2001/01/09 01:08:53	1.134
--- arm.c	2001/01/10 23:53:34
*************** arm_debugger_arg_offset (value, addr)
*** 8789,8795 ****
  void
  arm_init_builtins ()
  {
!   tree endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE);
    tree int_endlink = tree_cons (NULL_TREE, integer_type_node, endlink);
    tree pchar_type_node = build_pointer_type (char_type_node);
  
--- 8789,8795 ----
  void
  arm_init_builtins ()
  {
!   tree endlink = void_list_node;
    tree int_endlink = tree_cons (NULL_TREE, integer_type_node, endlink);
    tree pchar_type_node = build_pointer_type (char_type_node);
  
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.196
diff -c -p -r1.196 i386.c
*** i386.c	2001/01/08 12:47:15	1.196
--- i386.c	2001/01/10 23:53:38
*************** ix86_init_builtins ()
*** 7312,7318 ****
  {
    struct builtin_description * d;
    int i;
!   tree endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE);
  
    tree pchar_type_node = build_pointer_type (char_type_node);
    tree pfloat_type_node = build_pointer_type (float_type_node);
--- 7312,7318 ----
  {
    struct builtin_description * d;
    int i;
!   tree endlink = void_list_node;
  
    tree pchar_type_node = build_pointer_type (char_type_node);
    tree pfloat_type_node = build_pointer_type (float_type_node);
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.67
diff -c -p -r1.67 ia64.c
*** ia64.c	2001/01/04 14:17:40	1.67
--- ia64.c	2001/01/10 23:53:42
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.
!    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
     Contributed by James E. Wilson <wilson@cygnus.com> and
     		  David Mosberger <davidm@hpl.hp.com>.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.
!    Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
     Contributed by James E. Wilson <wilson@cygnus.com> and
     		  David Mosberger <davidm@hpl.hp.com>.
  
*************** ia64_init_builtins ()
*** 6440,6446 ****
  {
    tree psi_type_node = build_pointer_type (integer_type_node);
    tree pdi_type_node = build_pointer_type (long_integer_type_node);
!   tree endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE);
  
    /* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */
    tree si_ftype_psi_si_si
--- 6440,6446 ----
  {
    tree psi_type_node = build_pointer_type (integer_type_node);
    tree pdi_type_node = build_pointer_type (long_integer_type_node);
!   tree endlink = void_list_node;
  
    /* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */
    tree si_ftype_psi_si_si


More information about the Libstdc++ mailing list