From e02a1225c1f626b4a5ab872777bd27c7d770abcd Mon Sep 17 00:00:00 2001 From: drow Date: Sun, 25 Jul 2004 18:10:05 +0000 Subject: * config.gcc (i[34567]86-*-solaris2*, sparc64-*-solaris2*) (sparc-*-solaris2*): Include sol2.o and sol2-protos.h. * config/sol2-c.c: Include "tm.h", "tm_p.h", "toplev.h", "cpplib.h", "c-pragma.h", "c-common.h". (solaris_pragma_align, solaris_pragma_init, solaris_pragma_fini) (solaris_register_pragmas): New functions. * config/sol2-protos.h: New file. * config/sol2.c: New file. * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE, ASM_DECLARE_FUNCTION_SIZE) (REGISTER_TARGET_PRAGMAS): New macros. (solaris_pending_aligns, solaris_pending_inits) (solaris_pending_finis): New variables. * config/t-sol2 (sol2-c.o): Update dependencies. (sol2.o): New rule. * config/i386/i386.c (TARGET_INSERT_ATTRIBUTES): Define in terms of SUBTARGET_INSERT_ATTRIBUTES. (ix86_attribute_table): Include SUBTARGET_ATTRIBUTE_TABLE. * config/i386/sol2.h (SUBTARGET_INSERT_ATTRIBUTES) (SUBTARGET_ATTRIBUTE_TABLE, ASM_OUTPUT_CALL): Define. * config/sparc/elf.h (ASM_DECLARE_FUNCTION_SIZE): Redefine. * config/sparc/sp64-elf.h (ASM_DECLARE_FUNCTION_SIZE): Redefine. * config/sparc/sol2.h (SUBTARGET_INSERT_ATTRIBUTES) (SUBTARGET_ATTRIBUTE_TABLE, ASM_OUTPUT_CALL): Define. * config/sparc/sparc.c (sparc_attribute_table): New. (TARGET_INSERT_ATTRIBUTES): Define in terms of SUBTARGET_INSERT_ATTRIBUTES. (TARGET_ATTRIBUTE_TABLE): Define if SUBTARGET_ATTRIBUTE_TABLE is defined. * doc/extend.texi (Solaris Pragmas): New section. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85155 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/sol2.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'gcc/config/sol2.h') diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index f595395befb..ddad7c1f05c 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -1,6 +1,6 @@ /* Operating system specific defines to be used when targeting GCC for any Solaris 2 system. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -206,5 +206,31 @@ __enable_execute_stack (void *addr) \ } \ } +/* Support Solaris-specific format checking for cmn_err. */ #define TARGET_N_FORMAT_TYPES 1 #define TARGET_FORMAT_TYPES solaris_format_types + +/* #pragma init and #pragma fini are implemented on top of init and + fini attributes. */ +#define SOLARIS_ATTRIBUTE_TABLE \ + { "init", 0, 0, true, false, false, NULL }, \ + { "fini", 0, 0, true, false, false, NULL } + +/* This is how to declare the size of a function. For Solaris, we output + any .init or .fini entries here. */ +#undef ASM_DECLARE_FUNCTION_SIZE +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do \ + { \ + if (!flag_inhibit_size_directive) \ + ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ + solaris_output_init_fini (FILE, DECL); \ + } \ + while (0) + +/* Register the Solaris-specific #pragma directives. */ +#define REGISTER_TARGET_PRAGMAS() solaris_register_pragmas () + +extern GTY(()) tree solaris_pending_aligns; +extern GTY(()) tree solaris_pending_inits; +extern GTY(()) tree solaris_pending_finis; -- cgit v1.2.1