From 8f08ea1e474635cfba9093c0698960d33a9ef549 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 27 Feb 1999 22:21:58 +0000 Subject: frame.h: Update some comments. * 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. Co-Authored-By: Jeffrey A Law From-SVN: r25487 --- gcc/defaults.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gcc/defaults.h') diff --git a/gcc/defaults.h b/gcc/defaults.h index 0fbf2b9..a0e3bfc 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) -- cgit v1.1