summaryrefslogtreecommitdiff
path: root/gcc/defaults.h
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-27 22:21:58 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-27 22:21:58 +0000
commitee055d4068587282af49054a36194c9a4237a2f2 (patch)
treebe7ee5618d4e11bd2a665ea02e2211cb4ec1f20d /gcc/defaults.h
parenta37f5734ff1fcdec50ba474bfc0aa7ae4e440167 (diff)
downloadgcc-ee055d4068587282af49054a36194c9a4237a2f2.tar.gz
* frame.h: Update some comments.
* defaults.h (TARGET_ATTRIBUTE_WEAK): Define. * crtstuff.c (__register_frame_info, __deregister_frame_info): Declare using TARGET_WEAK_ATTRIBUTE. (__do_global_dtors_aux): Check if __deregister_frame_info is zero before calling it. (__do_global_dtors): Likewise. (frame_dummy): Check if __register_frame_info is zero before calling it. (__frame_dummy): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25487 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r--gcc/defaults.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 0fbf2b92af8..a0e3bfca57a 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -133,6 +133,22 @@ do { fprintf (FILE, "\t%s\t", ASM_LONG); \
#endif
#endif
+/* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
+ provide a weak attribute. Else define it to nothing.
+
+ This would normally belong in gansidecl.h, but SUPPORTS_WEAK is
+ not available at that time.
+
+ Note, this is only for use by target files which we know are to be
+ compiled by GCC. */
+#ifndef TARGET_ATTRIBUTE_WEAK
+# if SUPPORTS_WEAK
+# define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
+# else
+# define TARGET_ATTRIBUTE_WEAK
+# endif
+#endif
+
/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
the rest of the DWARF 2 frame unwind support is also provided. */
#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)