Commit ea4f1fce by Jeffrey Oldham Committed by Jeffrey D. Oldham

defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the linker supports…

defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the linker supports the init_priority C++ attribute.

gcc/ChangeLog:
2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>

	* defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the
	linker supports the init_priority C++ attribute.
	* tm.texi (SUPPORTS_INIT_PRIORITY): Documentation for new macro.
	* config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Indicate Irix
	linker does not support init_priority C++ attribute.

gcc/cp/ChangeLog:
2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>

	* tree.c: Add defaults.h
	(cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
	* Make-lang.in (cp/tree.o): Add defaults.h.

From-SVN: r39023
parent bfeee001
2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
* defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the
linker supports the init_priority C++ attribute.
* tm.texi (SUPPORTS_INIT_PRIORITY): Documentation for new macro.
* config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Indicate Irix
linker does not support init_priority C++ attribute.
Sun Jan 14 22:31:30 2001 J"orn Rennecke <amylaar@redhat.com> Sun Jan 14 22:31:30 2001 J"orn Rennecke <amylaar@redhat.com>
* Makefile.in (libgcc1-test.o): Depends on stmp-int-hdrs. * Makefile.in (libgcc1-test.o): Depends on stmp-int-hdrs.
......
/* Definitions of target machine for GNU compiler. Iris version 6. /* Definitions of target machine for GNU compiler. Iris version 6.
Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -205,6 +205,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -205,6 +205,10 @@ Boston, MA 02111-1307, USA. */
#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0) #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
/* Irix assembler does not support the init_priority C++ attribute. */
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 0
#define POPSECTION_ASM_OP "\t.popsection" #define POPSECTION_ASM_OP "\t.popsection"
#define DEBUG_INFO_SECTION ".debug_info,0x7000001e,0,0,1" #define DEBUG_INFO_SECTION ".debug_info,0x7000001e,0,0,1"
......
2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
* tree.c: Add defaults.h
(cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
* Make-lang.in (cp/tree.o): Add defaults.h.
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (CXX_C_OBJS): Add c-format.o. * Make-lang.in (CXX_C_OBJS): Add c-format.o.
......
...@@ -274,7 +274,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) ...@@ -274,7 +274,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H)
cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h
cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H) cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H)
cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \ cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \
insn-config.h integrate.h insn-config.h integrate.h defaults.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) system.h cp/ptree.o: cp/ptree.c $(CXX_TREE_H) system.h
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h defaults.h cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h defaults.h
cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \ cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
......
/* Language-dependent node constructors for parse phase of GNU compiler. /* Language-dependent node constructors for parse phase of GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000 Free Software Foundation, Inc. 1999, 2000, 2001 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com) Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC. This file is part of GNU CC.
...@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "ggc.h" #include "ggc.h"
#include "insn-config.h" #include "insn-config.h"
#include "integrate.h" #include "integrate.h"
#include "defaults.h"
static tree bot_manip PARAMS ((tree *, int *, void *)); static tree bot_manip PARAMS ((tree *, int *, void *));
static tree bot_replace PARAMS ((tree *, int *, void *)); static tree bot_replace PARAMS ((tree *, int *, void *));
...@@ -2312,8 +2313,16 @@ cp_valid_lang_attribute (attr_name, attr_args, decl, type) ...@@ -2312,8 +2313,16 @@ cp_valid_lang_attribute (attr_name, attr_args, decl, type)
("requested init_priority is reserved for internal use"); ("requested init_priority is reserved for internal use");
} }
DECL_INIT_PRIORITY (decl) = pri; if (SUPPORTS_INIT_PRIORITY)
return 1; {
DECL_INIT_PRIORITY (decl) = pri;
return 1;
}
else
{
error ("init_priority attribute is not supported on this platform");
return 0;
}
} }
return 0; return 0;
......
/* Definitions of various defaults for how to do assembler output /* Definitions of various defaults for how to do assembler output
(most of which are designed to be appropriate for GAS or for (most of which are designed to be appropriate for GAS or for
some BSD assembler). some BSD assembler).
Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000 Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com) Contributed by Ron Guilmette (rfg@monkeys.com)
...@@ -167,6 +167,12 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) ...@@ -167,6 +167,12 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
# endif # endif
#endif #endif
/* If the target supports init_priority C++ attribute, give
SUPPORTS_INIT_PRIORITY a nonzero value. */
#ifndef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 1
#endif /* SUPPORTS_INIT_PRIORITY */
/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
the rest of the DWARF 2 frame unwind support is also provided. */ the rest of the DWARF 2 frame unwind support is also provided. */
#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX) #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
......
...@@ -6387,6 +6387,13 @@ If defined, @code{main} will call @code{__main} despite the presence of ...@@ -6387,6 +6387,13 @@ If defined, @code{main} will call @code{__main} despite the presence of
where the init section is not actually run automatically, but is still where the init section is not actually run automatically, but is still
useful for collecting the lists of constructors and destructors. useful for collecting the lists of constructors and destructors.
@item SUPPORTS_INIT_PRIORITY
@findex SUPPORTS_INIT_PRIORITY
If nonzero, the C++ @code{init_priority} attribute is supported and the
compiler should emit instructions to control the order of initialization
of objects. If zero, the compiler will issue an error message upon
encountering an @code{init_priority} attribute.
@item ASM_OUTPUT_CONSTRUCTOR (@var{stream}, @var{name}) @item ASM_OUTPUT_CONSTRUCTOR (@var{stream}, @var{name})
@findex ASM_OUTPUT_CONSTRUCTOR @findex ASM_OUTPUT_CONSTRUCTOR
Define this macro as a C statement to output on the stream @var{stream} Define this macro as a C statement to output on the stream @var{stream}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment