This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Don't redefine REGISTER_TARGET_PRAGMAS on i386-pc-solaris2
- From: Rainer Orth <ro at techfak dot uni-bielefeld dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Jul 2008 14:24:42 +0200 (MEST)
- Subject: PATCH: Don't redefine REGISTER_TARGET_PRAGMAS on i386-pc-solaris2
As Art reported
http://gcc.gnu.org/ml/gcc-patches/2008-07/msg01894.html
mainline (as of r138117) fails to bootstrap on i386-pc-solaris2.10 because
config/sol2.h redefines REGISTER_TARGET_PRAGMAS from config/i386/i386.h.
The following patch fixes this along the lines of darwin.h and allows a
successful bootstrap (no baseline to compare against, though) on both
i386-pc-solaris2.10 and sparc-sun-solaris2.11.
Ok for mainline?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Thu Jul 24 19:34:33 2008 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/sol2.h (REGISTER_TARGET_PRAGMAS): Move ...
* config/i386/sol2.h (REGISTER_SUBTARGET_PRAGMAS): ... here.
* config/sparc/sol2.h (REGISTER_TARGET_PRAGMAS): ... and here.
Index: gcc/config/sparc/sol2.h
===================================================================
--- gcc/config/sparc/sol2.h (revision 138117)
+++ gcc/config/sparc/sol2.h (working copy)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GCC, for SPARC running Solaris 2
Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ 2006, 2007, 2008 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@netcom.com).
Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
@@ -167,6 +167,9 @@ along with GCC; see the file COPYING3.
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
+/* Register the Solaris-specific #pragma directives. */
+#define REGISTER_TARGET_PRAGMAS() solaris_register_pragmas ()
+
/* Output a simple call for .init/.fini. */
#define ASM_OUTPUT_CALL(FILE, FN) \
do \
Index: gcc/config/i386/sol2.h
===================================================================
--- gcc/config/i386/sol2.h (revision 138117)
+++ gcc/config/i386/sol2.h (working copy)
@@ -1,6 +1,6 @@
/* Target definitions for GCC for Intel 80386 running Solaris 2
Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2007 Free Software Foundation, Inc.
+ 2004, 2007, 2008 Free Software Foundation, Inc.
Contributed by Fred Fish (fnf@cygnus.com).
This file is part of GCC.
@@ -96,6 +96,9 @@ along with GCC; see the file COPYING3.
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
+/* Register the Solaris-specific #pragma directives. */
+#define REGISTER_SUBTARGET_PRAGMAS() solaris_register_pragmas ()
+
/* Output a simple call for .init/.fini. */
#define ASM_OUTPUT_CALL(FILE, FN) \
do \
Index: gcc/config/sol2.h
===================================================================
--- gcc/config/sol2.h (revision 138117)
+++ gcc/config/sol2.h (working copy)
@@ -1,6 +1,6 @@
/* Operating system specific defines to be used when targeting GCC for any
Solaris 2 system.
- Copyright 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -233,9 +233,6 @@ __enable_execute_stack (void *addr)
} \
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;