summaryrefslogtreecommitdiff
path: root/gcc/target-def.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-09 22:33:35 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-09 22:33:35 +0000
commit01d15dc570c9d303e03ad64a0f66a38f5ce4b8bd (patch)
treeddb2d5519f49bc33648c25225b8b8ba84df590b9 /gcc/target-def.h
parentbe6b7965bba925cee48dfe2af6c9a40e85c744c1 (diff)
downloadgcc-01d15dc570c9d303e03ad64a0f66a38f5ce4b8bd.tar.gz
Move constructor/destructor handling into target hooks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target-def.h')
-rw-r--r--gcc/target-def.h39
1 files changed, 37 insertions, 2 deletions
diff --git a/gcc/target-def.h b/gcc/target-def.h
index 939ca8fcbd2..94f8d10221c 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -33,6 +33,38 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
#define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
+#if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
+# ifdef CTORS_SECTION_ASM_OP
+# define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
+# else
+# ifdef TARGET_ASM_NAMED_SECTION
+# define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
+# else
+# define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
+# endif
+# endif
+#endif
+
+#if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
+# ifdef DTORS_SECTION_ASM_OP
+# define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
+# else
+# ifdef TARGET_ASM_NAMED_SECTION
+# define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
+# else
+# define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
+# endif
+# endif
+#endif
+
+#if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
+#define TARGET_HAVE_CTORS_DTORS true
+#else
+#define TARGET_HAVE_CTORS_DTORS false
+#define TARGET_ASM_CONSTRUCTOR NULL
+#define TARGET_ASM_DESTRUCTOR NULL
+#endif
+
#ifdef TARGET_ASM_NAMED_SECTION
#define TARGET_HAVE_NAMED_SECTIONS true
#else
@@ -46,7 +78,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TARGET_ASM_FUNCTION_END_PROLOGUE, \
TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \
TARGET_ASM_FUNCTION_EPILOGUE, \
- TARGET_ASM_NAMED_SECTION}
+ TARGET_ASM_NAMED_SECTION, \
+ TARGET_ASM_CONSTRUCTOR, \
+ TARGET_ASM_DESTRUCTOR}
/* All in tree.c. */
#define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes
@@ -80,5 +114,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TARGET_INIT_BUILTINS, \
TARGET_EXPAND_BUILTIN, \
TARGET_SECTION_TYPE_FLAGS, \
- TARGET_HAVE_NAMED_SECTIONS \
+ TARGET_HAVE_NAMED_SECTIONS, \
+ TARGET_HAVE_CTORS_DTORS \
}