public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [csl-sol210-branch] Add some Solaris #pragmas
@ 2004-07-13 23:06 Daniel Jacobowitz
  2004-07-14 19:56 ` Rainer Orth
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2004-07-13 23:06 UTC (permalink / raw)
  To: gcc-patches

This patch enables, for i386-pc-solaris2.10, a couple of #pragma directives:
  #pragma init
  #pragma fini
  #pragma align

These appear to be needed for compatibility with the Solaris 10 system
headers.  Committed to csl-sol210-branch; I'll submit it for mainline at a
later date, after additional testing.

Does any Sparc Solaris target need these?  If so I could put them in
config/...

-- 
Daniel Jacobowitz

2004-07-13  Daniel Jacobowitz  <dan@debian.org>

	* config.gcc (i[34567]86-*-solaris2.1[0-9]): Set tm_p_file,
	tmake_file, c_target_objs, and cxx_target_objs.
	* config/i386/i386.c (TARGET_INSERT_ATTRIBUTES): Define to
	SUBTARGET_INSERT_ATTRIBUTES.
	(ix86_attribute_table): Include "init" and "fini" if
	TARGET_INIT_FINI_ATTRIBUTES.
	* config/i386/sol2-10.h (SUBTARGET_INSERT_ATTRIBUTES)
	(REGISTER_TARGET_PRAGMAS, ASM_DECLARE_FUNCTION_SIZE)
	(TARGET_INIT_FINI_ATTRIBUTES): Define.
	* config/i386/sol2-10-protos.h: New file.
	* config/i386/sol2-c.c: New file.
	* config/i386/t-sol2-10: New file.
	* doc/extend.texi (Solaris Pragmas): New section.

2004-07-13  Daniel Jacobowitz  <dan@debian.org>

	* gcc.dg/pragma-align-2.c: New testcase.
	* gcc.dg/pragma-init-fini.c: New testcase.
	* gcc.dg/pragma-align.c: Run test.  Include i?86-solaris2.1[0-9]*.

Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.465.2.1
diff -u -p -r1.465.2.1 config.gcc
--- gcc/config.gcc	12 Jul 2004 14:59:19 -0000	1.465.2.1
+++ gcc/config.gcc	13 Jul 2004 19:38:50 -0000
@@ -986,7 +986,11 @@ i[34567]86-*-solaris2*)
 	case ${target} in
 	*-*-solaris2.1[0-9])
 		tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
+		tm_p_file="${tm_p_file} i386/sol2-10-protos.h"
 		tm_defines="${tm_defines} TARGET_BI_ARCH=1"
+		tmake_file="${tmake_file} i386/t-sol2-10"
+		c_target_objs="sol2-c.o"
+		cxx_target_objs="sol2-c.o"
 		;;
 	esac
 	extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
Index: gcc/config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.685.2.1
diff -u -p -r1.685.2.1 i386.c
--- gcc/config/i386/i386.c	12 Jul 2004 14:42:52 -0000	1.685.2.1
+++ gcc/config/i386/i386.c	13 Jul 2004 19:38:52 -0000
@@ -1075,6 +1075,11 @@ static void init_ext_80387_constants (vo
 #undef TARGET_GIMPLIFY_VA_ARG_EXPR
 #define TARGET_GIMPLIFY_VA_ARG_EXPR ix86_gimplify_va_arg
 
+#ifdef SUBTARGET_INSERT_ATTRIBUTES
+#undef TARGET_INSERT_ATTRIBUTES
+#define TARGET_INSERT_ATTRIBUTES SUBTARGET_INSERT_ATTRIBUTES
+#endif
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 \f
@@ -1598,6 +1603,10 @@ const struct attribute_spec ix86_attribu
 #endif
   { "ms_struct", 0, 0, false, false,  false, ix86_handle_struct_attribute },
   { "gcc_struct", 0, 0, false, false,  false, ix86_handle_struct_attribute },
+#ifdef TARGET_INIT_FINI_ATTRIBUTES
+  { "init",      0, 0, true,  false,  false, NULL },
+  { "fini",      0, 0, true,  false,  false, NULL },
+#endif
   { NULL,        0, 0, false, false, false, NULL }
 };
 
Index: gcc/config/i386/sol2-10-protos.h
===================================================================
RCS file: gcc/config/i386/sol2-10-protos.h
diff -N gcc/config/i386/sol2-10-protos.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/i386/sol2-10-protos.h	13 Jul 2004 19:38:52 -0000
@@ -0,0 +1,25 @@
+/* Prototypes.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+extern void solaris_insert_attributes (tree, tree *);
+extern void solaris_pragma_align (struct cpp_reader *);
+extern void solaris_pragma_init (struct cpp_reader *);
+extern void solaris_pragma_fini (struct cpp_reader *);
+extern void solaris_output_init_fini (FILE *, tree);
Index: gcc/config/i386/sol2-10.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/Attic/sol2-10.h,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 sol2-10.h
--- gcc/config/i386/sol2-10.h	12 Jul 2004 14:59:20 -0000	1.1.2.1
+++ gcc/config/i386/sol2-10.h	13 Jul 2004 19:38:52 -0000
@@ -35,3 +35,25 @@ Boston, MA 02111-1307, USA.  */
 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 32
+
+#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
+
+#define REGISTER_TARGET_PRAGMAS()				\
+  do {								\
+    c_register_pragma (0, "align", solaris_pragma_align);	\
+    c_register_pragma (0, "init", solaris_pragma_init);		\
+    c_register_pragma (0, "fini", solaris_pragma_fini);		\
+  } while (0)
+
+/* This is how to declare the size of a function.  */
+#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)
+
+#define TARGET_INIT_FINI_ATTRIBUTES
Index: gcc/config/i386/sol2-c.c
===================================================================
RCS file: gcc/config/i386/sol2-c.c
diff -N gcc/config/i386/sol2-c.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/i386/sol2-c.c	13 Jul 2004 19:38:52 -0000
@@ -0,0 +1,299 @@
+/* Solaris support needed only by C/C++ frontends.
+   Copyright (C) 2004  Free Software Foundation, Inc.
+   Contributed by CodeSourcery, LLC.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "cpplib.h"
+#include "tree.h"
+#include "c-pragma.h"
+#include "c-tree.h"
+#include "c-incpath.h"
+#include "toplev.h"
+#include "tm_p.h"
+
+static GTY(()) tree pending_aligns, pending_inits, pending_finis;
+
+/* Handle #pragma align ALIGNMENT (VAR [, VAR]...)  */
+
+void
+solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED)
+{
+  tree t, x;
+  enum cpp_ttype ttype;
+  HOST_WIDE_INT low;
+
+  if (c_lex (&x) != CPP_NUMBER
+      || c_lex (&t) != CPP_OPEN_PAREN)
+    {
+      warning ("malformed %<#pragma align%>, ignoring");
+      return;
+    }
+
+  low = TREE_INT_CST_LOW (x);
+  if (TREE_INT_CST_HIGH (x) != 0
+      || (low != 1 && low != 2 && low != 4 && low != 8 && low != 16
+	  && low != 32 && low != 64 && low != 128))
+    {
+      warning ("invalid alignment for %<#pragma align%>, ignoring");
+      return;
+    }
+
+  ttype = c_lex (&t);
+  if (ttype != CPP_NAME)
+    {
+      warning ("malformed %<#pragma align%>, ignoring");
+      return;
+    }
+
+  while (1)
+    {
+      tree decl = identifier_global_value (t);
+      if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+	warning ("%<#pragma align%> must appear before the declaration of "
+		 "%D, ignoring", decl);
+      else
+	pending_aligns = tree_cons (t, build_tree_list (NULL, x),
+				    pending_aligns);
+
+      ttype = c_lex (&t);
+      if (ttype == CPP_COMMA)
+	{
+	  ttype = c_lex (&t);
+	  if (ttype != CPP_NAME)
+	    {
+	      warning ("malformed %<#pragma align%>");
+	      return;
+	    }
+	}
+      else if (ttype == CPP_CLOSE_PAREN)
+	{
+	  if (c_lex (&t) != CPP_EOF)
+	    warning ("junk at end of %<#pragma align%>");
+	  return;
+	}
+      else
+	{
+	  warning ("malformed %<#pragma align%>");
+	  return;
+	}
+    }
+}
+
+/* Handle #pragma init (function [, function]...)  */
+
+void
+solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED)
+{
+  tree t;
+  enum cpp_ttype ttype;
+
+  if (c_lex (&t) != CPP_OPEN_PAREN)
+    {
+      warning ("malformed %<#pragma init%>, ignoring");
+      return;
+    }
+
+  ttype = c_lex (&t);
+  if (ttype != CPP_NAME)
+    {
+      warning ("malformed %<#pragma init%>, ignoring");
+      return;
+    }
+
+  while (1)
+    {
+      tree decl = identifier_global_value (t);
+      if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+	{
+	  tree init_list = build_tree_list (get_identifier ("init"),
+					    NULL);
+	  tree attrs = tree_cons (get_identifier ("used"), NULL, init_list);
+	  decl_attributes (&decl, attrs, 0);
+	}
+      else
+	pending_inits = tree_cons (t, NULL, pending_inits);
+
+      ttype = c_lex (&t);
+      if (ttype == CPP_COMMA)
+	{
+	  ttype = c_lex (&t);
+	  if (ttype != CPP_NAME)
+	    {
+	      warning ("malformed %<#pragma init%>");
+	      return;
+	    }
+	}
+      else if (ttype == CPP_CLOSE_PAREN)
+	{
+	  if (c_lex (&t) != CPP_EOF)
+	    warning ("junk at end of %<#pragma init%>");
+	  return;
+	}
+      else
+	{
+	  warning ("malformed %<#pragma init%>");
+	  return;
+	}
+    }
+}
+
+/* Handle #pragma fini (function [, function]...)  */
+
+void
+solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED)
+{
+  tree t;
+  enum cpp_ttype ttype;
+
+  if (c_lex (&t) != CPP_OPEN_PAREN)
+    {
+      warning ("malformed %<#pragma fini%>, ignoring");
+      return;
+    }
+
+  ttype = c_lex (&t);
+  if (ttype != CPP_NAME)
+    {
+      warning ("malformed %<#pragma fini%>, ignoring");
+      return;
+    }
+
+  while (1)
+    {
+      tree decl = identifier_global_value (t);
+      if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+	{
+	  tree fini_list = build_tree_list (get_identifier ("fini"),
+					    NULL);
+	  tree attrs = tree_cons (get_identifier ("used"), NULL, fini_list);
+	  decl_attributes (&decl, attrs, 0);
+	}
+      else
+	pending_finis = tree_cons (t, NULL, pending_finis);
+
+      ttype = c_lex (&t);
+      if (ttype == CPP_COMMA)
+	{
+	  ttype = c_lex (&t);
+	  if (ttype != CPP_NAME)
+	    {
+	      warning ("malformed %<#pragma fini%>");
+	      return;
+	    }
+	}
+      else if (ttype == CPP_CLOSE_PAREN)
+	{
+	  if (c_lex (&t) != CPP_EOF)
+	    warning ("junk at end of %<#pragma fini%>");
+	  return;
+	}
+      else
+	{
+	  warning ("malformed %<#pragma fini%>");
+	  return;
+	}
+    }
+}
+
+/* Attach any pending attributes for DECL to the list in *ATTRIBUTES.  */
+
+void
+solaris_insert_attributes (tree decl, tree *attributes)
+{
+  tree *x, next;
+
+  if (pending_aligns != NULL && TREE_CODE (decl) == VAR_DECL)
+    for (x = &pending_aligns; *x; x = &TREE_CHAIN (pending_aligns))
+      {
+	tree name = TREE_PURPOSE (*x);
+	tree value = TREE_VALUE (*x);
+	if (DECL_NAME (decl) == name)
+	  {
+	    if (lookup_attribute ("aligned", DECL_ATTRIBUTES (decl))
+		|| lookup_attribute ("aligned", *attributes))
+	      warning ("%Jignoring %<#pragma align%> for explicitly "
+		       "aligned %<%D%>", decl, decl);
+	    else
+	      *attributes = tree_cons (get_identifier ("aligned"), value,
+				       *attributes);
+	    next = TREE_CHAIN (*x);
+	    ggc_free (*x);
+	    *x = next;
+	    break;
+	  }
+      }
+
+  if (pending_inits != NULL && TREE_CODE (decl) == FUNCTION_DECL)
+    for (x = &pending_inits; *x; x = &TREE_CHAIN (pending_inits))
+      {
+	tree name = TREE_PURPOSE (*x);
+	if (DECL_NAME (decl) == name)
+	  {
+	    *attributes = tree_cons (get_identifier ("init"), NULL,
+				     *attributes);
+	    *attributes = tree_cons (get_identifier ("used"), NULL,
+				     *attributes);
+	    next = TREE_CHAIN (*x);
+	    ggc_free (*x);
+	    *x = next;
+	    break;
+	  }
+      }
+
+  if (pending_finis != NULL && TREE_CODE (decl) == FUNCTION_DECL)
+    for (x = &pending_finis; *x; x = &TREE_CHAIN (pending_finis))
+      {
+	tree name = TREE_PURPOSE (*x);
+	if (DECL_NAME (decl) == name)
+	  {
+	    *attributes = tree_cons (get_identifier ("fini"), NULL,
+				     *attributes);
+	    *attributes = tree_cons (get_identifier ("used"), NULL,
+				     *attributes);
+	    next = TREE_CHAIN (*x);
+	    ggc_free (*x);
+	    *x = next;
+	    break;
+	  }
+      }
+}
+
+/* Output initializer or finalizer entries for DECL to FILE.  */
+
+void
+solaris_output_init_fini (FILE *file, tree decl)
+{
+  if (lookup_attribute ("init", DECL_ATTRIBUTES (decl)))
+    {
+      fprintf (file, "\t.section\t.init\n");
+      fprintf (file, "\tcall\t%s\n", IDENTIFIER_POINTER (DECL_NAME (decl)));
+      fprintf (file, "\t.popsection\n");
+    }
+
+  if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl)))
+    {
+      fprintf (file, "\t.section\t.fini\n");
+      fprintf (file, "\tcall\t%s\n", IDENTIFIER_POINTER (DECL_NAME (decl)));
+      fprintf (file, "\t.popsection\n");
+    }
+}
Index: gcc/config/i386/t-sol2-10
===================================================================
RCS file: gcc/config/i386/t-sol2-10
diff -N gcc/config/i386/t-sol2-10
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/i386/t-sol2-10	13 Jul 2004 19:38:52 -0000
@@ -0,0 +1,6 @@
+# Solaris-specific pragmas
+sol2-c.o: $(srcdir)/config/i386/sol2-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+  $(TM_H) $(CPPLIB_H) tree.h c-pragma.h $(C_TREE_H) toplev.h $(TM_P_H) \
+  c-incpath.h
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	  $(srcdir)/config/i386/sol2-c.c
Index: gcc/doc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.200
diff -u -p -r1.200 extend.texi
--- gcc/doc/extend.texi	7 Jul 2004 17:38:40 -0000	1.200
+++ gcc/doc/extend.texi	13 Jul 2004 19:38:54 -0000
@@ -7209,6 +7209,7 @@ for further explanation.
 * ARM Pragmas::
 * RS/6000 and PowerPC Pragmas::
 * Darwin Pragmas::
+* Solaris Pragmas::
 * Symbol-Renaming Pragmas::
 @end menu
 
@@ -7293,6 +7294,38 @@ that of the @code{unused} attribute, exc
 anywhere within the variables' scopes.
 @end table
 
+@node Solaris Pragmas
+@subsection Solaris Pragmas
+
+The Solaris target supports @code{#pragma redefine_extname}
+(@pxref{Symbol-Renaming Pragmas}).  The x86/AMD64 Solaris 10 target also
+supports additional @code{#pragma} directives for compatibility with system
+headers.
+
+@table @code
+@item align @var{alignment} (@var{variable} [, @var{variable}]...)
+@cindex pragma, align
+
+Increase the minimum alignment of each @var{variable} to @var{alignment}.
+This is the same as GCC's @code{aligned} attribute @pxref{Variable
+Attributes}).
+
+@item fini (@var{function} [, @var{function}]...)
+@cindex pragma, fini
+
+This pragma causes each listed @var{function} to be called after
+main, or during shared module unloading, by adding a call to the
+@code{.fini} section.
+
+@item init (@var{function} [, @var{function}]...)
+@cindex pragma, init
+
+This pragma causes each listed @var{function} to be called during
+initialization (before @code{main}) or during shared module loading, by
+adding a call to the @code{.init} section.
+
+@end table
+
 @node Symbol-Renaming Pragmas
 @subsection Symbol-Renaming Pragmas
 
Index: gcc/testsuite/gcc.dg/pragma-align-2.c
===================================================================
RCS file: gcc/testsuite/gcc.dg/pragma-align-2.c
diff -N gcc/testsuite/gcc.dg/pragma-align-2.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/pragma-align-2.c	13 Jul 2004 19:38:54 -0000
@@ -0,0 +1,54 @@
+/* { dg-do run { target i?86-*-solaris2.1[0-9]* } } */
+
+void abort (void);
+
+#pragma align 1(x1)
+#pragma align 2(x2)
+#pragma align 4(x4)
+#pragma align 8(x8,y8,z8)
+#pragma align 16(x16)
+#pragma align 32(x32)
+#pragma align 64(x64)
+#pragma align 128(x128)
+
+#pragma align 8(not_defined)
+
+#pragma align 9(odd_align)	/* { dg-error "invalid alignment" } */
+#pragma align 256(high_align)	/* { dg-error "invalid alignment" } */
+#pragma align -1(neg_align)	/* { dg-error "malformed" } */
+#pragma align bad_align		/* { dg-error "malformed" } */
+#pragma align 1(bad_align	/* { dg-error "malformed" } */
+
+int x, x1, x2, x4, x8, y8, z8, x16, x32, x64, x128;
+
+#pragma align 16(x)		/* { dg-error "must appear before" } */
+
+int
+main ()
+{
+  if (__alignof__ (x4) < 4)
+    abort ();
+
+  if (__alignof__ (x8) < 8)
+    abort ();
+
+  if (__alignof__ (y8) < 8)
+    abort ();
+
+  if (__alignof__ (z8) < 8)
+    abort ();
+
+  if (__alignof__ (x16) < 16)
+    abort ();
+
+  if (__alignof__ (x32) < 32)
+    abort ();
+
+  if (__alignof__ (x64) < 64)
+    abort ();
+
+  if (__alignof__ (x128) < 128)
+    abort ();
+
+  return 0;
+}
Index: gcc/testsuite/gcc.dg/pragma-align.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/pragma-align.c,v
retrieving revision 1.2
diff -u -p -r1.2 pragma-align.c
--- gcc/testsuite/gcc.dg/pragma-align.c	11 Sep 2000 22:47:05 -0000	1.2
+++ gcc/testsuite/gcc.dg/pragma-align.c	13 Jul 2004 19:38:54 -0000
@@ -1,6 +1,6 @@
 /* Prove that HANDLE_SYSTEMV_PRAGMA alignment handling works somewhat. */
 
-/* { dg-do compile { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* i?86-*-solaris2.1[0-9]* } } */
 
 struct {
         char one;
@@ -39,4 +39,3 @@ main()
         if(sizeof(resetalign) != sizeof(defaultalign)) abort();
 	return 0;
 }
-
Index: gcc/testsuite/gcc.dg/pragma-init-fini.c
===================================================================
RCS file: gcc/testsuite/gcc.dg/pragma-init-fini.c
diff -N gcc/testsuite/gcc.dg/pragma-init-fini.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/pragma-init-fini.c	13 Jul 2004 19:38:54 -0000
@@ -0,0 +1,50 @@
+/* Tests for #pragma init and #pragma fini.  */
+
+/* { dg-do run { target i?86-*-solaris2.1[0-9]* } } */
+
+extern void abort ();
+
+#pragma init		/* { dg-error "malformed" } */
+#pragma init ()		/* { dg-error "malformed" } */
+#pragma init init_func	/* { dg-error "malformed" } */
+
+#pragma fini		/* { dg-error "malformed" } */
+#pragma fini ()		/* { dg-error "malformed" } */
+#pragma fini fini_func	/* { dg-error "malformed" } */
+
+#pragma init (init_func, init_static_func)
+
+int glob_1, glob_2;
+
+void init_func (void)
+{
+  glob_1 = 1;
+}
+
+static void init_static_func (void)
+{
+  glob_2 = 2;
+}
+
+#pragma fini (fini_func, fini_static_func)
+
+void fini_func (void)
+{
+
+}
+
+static void fini_static_func (void)
+{
+
+}
+
+int main()
+{
+  if (glob_1 != 1)
+    abort ();
+
+  if (glob_2 != 2)
+    abort ();
+
+  return 0;
+}

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-13 23:06 [csl-sol210-branch] Add some Solaris #pragmas Daniel Jacobowitz
@ 2004-07-14 19:56 ` Rainer Orth
  2004-07-14 22:46   ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Rainer Orth @ 2004-07-14 19:56 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gcc-patches

Daniel Jacobowitz <drow@false.org> writes:

> This patch enables, for i386-pc-solaris2.10, a couple of #pragma directives:
>   #pragma init
>   #pragma fini
>   #pragma align
> 
> These appear to be needed for compatibility with the Solaris 10 system
> headers.  Committed to csl-sol210-branch; I'll submit it for mainline at a

I couldn't find any mention in the current Solaris 10 (i.e. s10_60 aka Beta
5) system headers, though.

> later date, after additional testing.
> 
> Does any Sparc Solaris target need these?  If so I could put them in
> config/...

They certainly exist on both SPARC and x86 as far back as the WorkShop 5.0
compilers from 1999, so they should probably be made available for all
Solaris 2 versions on both platforms.  Cf. e.g.

	http://docs.sun.com/db/doc/805-4955/6j4mg806k?q=pragma+init&a=view
and
	http://docs.sun.com/source/817-5070/Pragmas_App.html

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-14 19:56 ` Rainer Orth
@ 2004-07-14 22:46   ` Daniel Jacobowitz
  2004-07-14 23:10     ` Rainer Orth
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2004-07-14 22:46 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

On Wed, Jul 14, 2004 at 03:59:28PM +0200, Rainer Orth wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> 
> > This patch enables, for i386-pc-solaris2.10, a couple of #pragma directives:
> >   #pragma init
> >   #pragma fini
> >   #pragma align
> > 
> > These appear to be needed for compatibility with the Solaris 10 system
> > headers.  Committed to csl-sol210-branch; I'll submit it for mainline at a
> 
> I couldn't find any mention in the current Solaris 10 (i.e. s10_60 aka Beta
> 5) system headers, though.

I suspect that they have been or will be added; I don't know for sure.

> > later date, after additional testing.
> > 
> > Does any Sparc Solaris target need these?  If so I could put them in
> > config/...
> 
> They certainly exist on both SPARC and x86 as far back as the WorkShop 5.0
> compilers from 1999, so they should probably be made available for all
> Solaris 2 versions on both platforms.  Cf. e.g.
> 
> 	http://docs.sun.com/db/doc/805-4955/6j4mg806k?q=pragma+init&a=view
> and
> 	http://docs.sun.com/source/817-5070/Pragmas_App.html

I've got no problem with enabling the #pragmas for all Solaris 2
targets.  Would this be acceptable?  They are not vitally necessary,
and the general trend in GCC is away from #pragma/_Pragma, but they are
for compatibility with the vendor's compiler and documentation.

-- 
Daniel Jacobowitz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-14 22:46   ` Daniel Jacobowitz
@ 2004-07-14 23:10     ` Rainer Orth
  2004-07-16  9:52       ` Mark Mitchell
  0 siblings, 1 reply; 8+ messages in thread
From: Rainer Orth @ 2004-07-14 23:10 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gcc-patches

Daniel Jacobowitz writes:

> I've got no problem with enabling the #pragmas for all Solaris 2
> targets.  Would this be acceptable?  They are not vitally necessary,
> and the general trend in GCC is away from #pragma/_Pragma, but they are
> for compatibility with the vendor's compiler and documentation.

In that case, I cannot see any rationale for supporting them only on
Solaris 10/x86 and up if the vendor compiler provides them on both SPARC
and x86 and well before Solaris 10.  That would be even more confusing to
users than not supporting them at all.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-14 23:10     ` Rainer Orth
@ 2004-07-16  9:52       ` Mark Mitchell
  2004-07-20 20:33         ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Mitchell @ 2004-07-16  9:52 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Daniel Jacobowitz, gcc-patches

Rainer Orth wrote:

>Daniel Jacobowitz writes:
>
>  
>
>>I've got no problem with enabling the #pragmas for all Solaris 2
>>targets.  Would this be acceptable?  They are not vitally necessary,
>>and the general trend in GCC is away from #pragma/_Pragma, but they are
>>for compatibility with the vendor's compiler and documentation.
>>    
>>
>
>In that case, I cannot see any rationale for supporting them only on
>Solaris 10/x86 and up if the vendor compiler provides them on both SPARC
>and x86 and well before Solaris 10.  That would be even more confusing to
>users than not supporting them at all.
>
Yes, I think that if the vendor compiler has supported them for a long 
time, we should just put them into generic Solaris 2 support.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-16  9:52       ` Mark Mitchell
@ 2004-07-20 20:33         ` Daniel Jacobowitz
  2004-07-20 20:48           ` Mark Mitchell
  2004-07-29 19:31           ` Joern Rennecke
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2004-07-20 20:33 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: Rainer Orth, gcc-patches

On Thu, Jul 15, 2004 at 07:04:45PM -0700, Mark Mitchell wrote:
> Rainer Orth wrote:
> 
> >Daniel Jacobowitz writes:
> >
> > 
> >
> >>I've got no problem with enabling the #pragmas for all Solaris 2
> >>targets.  Would this be acceptable?  They are not vitally necessary,
> >>and the general trend in GCC is away from #pragma/_Pragma, but they are
> >>for compatibility with the vendor's compiler and documentation.
> >>   
> >>
> >
> >In that case, I cannot see any rationale for supporting them only on
> >Solaris 10/x86 and up if the vendor compiler provides them on both SPARC
> >and x86 and well before Solaris 10.  That would be even more confusing to
> >users than not supporting them at all.
> >
> Yes, I think that if the vendor compiler has supported them for a long 
> time, we should just put them into generic Solaris 2 support.

Here is a patch which adds #pragma align, #pragma init, and #pragma
fini to all Solaris targets.

This patch has been only minimally tested.  I can build (just "make") a
compiler on sparc-sun-solaris2.8, but I can't bootstrap in the last few
days (I have no idea when this started):

stage1/xgcc -Bstage1/ -B/usr/local/sparc-sun-solaris2.8/bin/ -c   -g
 -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
 -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
 -Wold-style-definition -Werror -fno-common   -DHAVE_CONFIG_H
 -DGENERATOR_FILE    -I. -I. -I/scratch/dan/gcc/gcc
 -I/scratch/dan/gcc/gcc/. -I/scratch/dan/gcc/gcc/../include -I./../intl
 -I/scratch/dan/gcc/gcc/../libcpp/include
 -I/scratch/dan/gcc/gcc/../libbanshee/libcompat
 -I/scratch/dan/gcc/gcc/../libbanshee
 -I/scratch/dan/gcc/gcc/../libbanshee/points-to
 /scratch/dan/gcc/gcc/gengtype.c -o gengtype.o

/scratch/dan/gcc/gcc/gengtype.c: In function `do_scalar_typedef':
/scratch/dan/gcc/gcc/gengtype.c:134: internal compiler error: in schedule_insns, at sched-rgn.c:2744
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [gengtype.o] Error 1

I have never bootstrapped on this machine before so I figure I'll poll
in case that error looks familiar to anyone else before I start poking
at it; that appears to be a mismatch in the number of death notes in a
region.

-- 
Daniel Jacobowitz

2004-07-19  Daniel Jacobowitz  <dan@debian.org>

	* 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.

2004-07-19  Daniel Jacobowitz  <dan@debian.org>

	* testsuite/gcc.dg/pragma-align-2.c: New test.
	* testsuite/gcc.dg/pragma-init-fini.c: New test.
	* testsuite/gcc.dg/pragma-align.c: Change from compile to run.
	Run on Solaris targets.

Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.468
diff -u -p -r1.468 config.gcc
--- gcc/config.gcc	19 Jul 2004 14:47:53 -0000	1.468
+++ gcc/config.gcc	19 Jul 2004 22:36:30 -0000
@@ -975,6 +975,8 @@ i[34567]86-*-solaris2*)
 	tmake_file="t-sol2 i386/t-sol2 t-svr4"
 	c_target_objs="sol2-c.o"
 	cxx_target_objs="sol2-c.o"
+	extra_objs="sol2.o"
+	tm_p_file="${tm_p_file} sol2-protos.h"
 	if test x$gnu_ld = xyes; then
 		tmake_file="$tmake_file t-slibgcc-elf-ver"
 	else
@@ -1861,6 +1863,8 @@ sparc64-*-solaris2* | sparcv9-*-solaris2
 	fi
 	c_target_objs="sol2-c.o"
 	cxx_target_objs="sol2-c.o"
+	extra_objs="sol2.o"
+	tm_p_file="${tm_p_file} sol2-protos.h"
 	extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
 	case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
 	  no:*:*) ;;
@@ -1900,6 +1904,8 @@ sparc-*-solaris2*)
 	esac
 	c_target_objs="sol2-c.o"
 	cxx_target_objs="sol2-c.o"
+	extra_objs="sol2.o"
+	tm_p_file="${tm_p_file} sol2-protos.h"
 	extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
 	case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
 	  no:*:*) ;;
Index: gcc/config/sol2-c.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sol2-c.c,v
retrieving revision 1.1
diff -u -p -r1.1 sol2-c.c
--- gcc/config/sol2-c.c	19 Jul 2004 14:47:54 -0000	1.1
+++ gcc/config/sol2-c.c	19 Jul 2004 22:36:30 -0000
@@ -23,10 +23,17 @@ Boston, MA 02111-1307, USA.  */
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
+#include "tm.h"
+#include "tm_p.h"
+#include "toplev.h"
 
 #include "c-format.h"
 #include "intl.h"
 
+#include "cpplib.h"
+#include "c-pragma.h"
+#include "c-common.h"
+
 /* cmn_err only accepts "l" and "ll".  */
 static const format_length_info cmn_err_length_specs[] =
 {
@@ -70,3 +77,195 @@ const format_kind_info solaris_format_ty
     &integer_type_node, &integer_type_node
   }
 };
+
+/* Handle #pragma align ALIGNMENT (VAR [, VAR]...)  */
+
+static void
+solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED)
+{
+  tree t, x;
+  enum cpp_ttype ttype;
+  HOST_WIDE_INT low;
+
+  if (c_lex (&x) != CPP_NUMBER
+      || c_lex (&t) != CPP_OPEN_PAREN)
+    {
+      warning ("malformed %<#pragma align%>, ignoring");
+      return;
+    }
+
+  low = TREE_INT_CST_LOW (x);
+  if (TREE_INT_CST_HIGH (x) != 0
+      || (low != 1 && low != 2 && low != 4 && low != 8 && low != 16
+	  && low != 32 && low != 64 && low != 128))
+    {
+      warning ("invalid alignment for %<#pragma align%>, ignoring");
+      return;
+    }
+
+  ttype = c_lex (&t);
+  if (ttype != CPP_NAME)
+    {
+      warning ("malformed %<#pragma align%>, ignoring");
+      return;
+    }
+
+  while (1)
+    {
+      tree decl = identifier_global_value (t);
+      if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+	warning ("%<#pragma align%> must appear before the declaration of "
+		 "%D, ignoring", decl);
+      else
+	solaris_pending_aligns = tree_cons (t, build_tree_list (NULL, x),
+					    solaris_pending_aligns);
+
+      ttype = c_lex (&t);
+      if (ttype == CPP_COMMA)
+	{
+	  ttype = c_lex (&t);
+	  if (ttype != CPP_NAME)
+	    {
+	      warning ("malformed %<#pragma align%>");
+	      return;
+	    }
+	}
+      else if (ttype == CPP_CLOSE_PAREN)
+	{
+	  if (c_lex (&t) != CPP_EOF)
+	    warning ("junk at end of %<#pragma align%>");
+	  return;
+	}
+      else
+	{
+	  warning ("malformed %<#pragma align%>");
+	  return;
+	}
+    }
+}
+
+/* Handle #pragma init (function [, function]...)  */
+
+static void
+solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED)
+{
+  tree t;
+  enum cpp_ttype ttype;
+
+  if (c_lex (&t) != CPP_OPEN_PAREN)
+    {
+      warning ("malformed %<#pragma init%>, ignoring");
+      return;
+    }
+
+  ttype = c_lex (&t);
+  if (ttype != CPP_NAME)
+    {
+      warning ("malformed %<#pragma init%>, ignoring");
+      return;
+    }
+
+  while (1)
+    {
+      tree decl = identifier_global_value (t);
+      if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+	{
+	  tree init_list = build_tree_list (get_identifier ("init"),
+					    NULL);
+	  tree attrs = tree_cons (get_identifier ("used"), NULL, init_list);
+	  decl_attributes (&decl, attrs, 0);
+	}
+      else
+	solaris_pending_inits = tree_cons (t, NULL, solaris_pending_inits);
+
+      ttype = c_lex (&t);
+      if (ttype == CPP_COMMA)
+	{
+	  ttype = c_lex (&t);
+	  if (ttype != CPP_NAME)
+	    {
+	      warning ("malformed %<#pragma init%>");
+	      return;
+	    }
+	}
+      else if (ttype == CPP_CLOSE_PAREN)
+	{
+	  if (c_lex (&t) != CPP_EOF)
+	    warning ("junk at end of %<#pragma init%>");
+	  return;
+	}
+      else
+	{
+	  warning ("malformed %<#pragma init%>");
+	  return;
+	}
+    }
+}
+
+/* Handle #pragma fini (function [, function]...)  */
+
+static void
+solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED)
+{
+  tree t;
+  enum cpp_ttype ttype;
+
+  if (c_lex (&t) != CPP_OPEN_PAREN)
+    {
+      warning ("malformed %<#pragma fini%>, ignoring");
+      return;
+    }
+
+  ttype = c_lex (&t);
+  if (ttype != CPP_NAME)
+    {
+      warning ("malformed %<#pragma fini%>, ignoring");
+      return;
+    }
+
+  while (1)
+    {
+      tree decl = identifier_global_value (t);
+      if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+	{
+	  tree fini_list = build_tree_list (get_identifier ("fini"),
+					    NULL);
+	  tree attrs = tree_cons (get_identifier ("used"), NULL, fini_list);
+	  decl_attributes (&decl, attrs, 0);
+	}
+      else
+	solaris_pending_finis = tree_cons (t, NULL, solaris_pending_finis);
+
+      ttype = c_lex (&t);
+      if (ttype == CPP_COMMA)
+	{
+	  ttype = c_lex (&t);
+	  if (ttype != CPP_NAME)
+	    {
+	      warning ("malformed %<#pragma fini%>");
+	      return;
+	    }
+	}
+      else if (ttype == CPP_CLOSE_PAREN)
+	{
+	  if (c_lex (&t) != CPP_EOF)
+	    warning ("junk at end of %<#pragma fini%>");
+	  return;
+	}
+      else
+	{
+	  warning ("malformed %<#pragma fini%>");
+	  return;
+	}
+    }
+}
+
+/* Register Solaris-specific #pragma directives.  */
+
+void
+solaris_register_pragmas (void)
+{
+  c_register_pragma (0, "align", solaris_pragma_align);
+  c_register_pragma (0, "init", solaris_pragma_init);
+  c_register_pragma (0, "fini", solaris_pragma_fini);
+}
Index: gcc/config/sol2-protos.h
===================================================================
RCS file: gcc/config/sol2-protos.h
diff -N gcc/config/sol2-protos.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/sol2-protos.h	19 Jul 2004 22:36:30 -0000
@@ -0,0 +1,24 @@
+/* Operating system specific prototypes to be used when targeting GCC for any
+   Solaris 2 system.
+   Copyright 2004 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+extern void solaris_insert_attributes (tree, tree *);
+extern void solaris_register_pragmas (void);
+extern void solaris_output_init_fini (FILE *, tree);
Index: gcc/config/sol2.c
===================================================================
RCS file: gcc/config/sol2.c
diff -N gcc/config/sol2.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/sol2.c	19 Jul 2004 22:36:30 -0000
@@ -0,0 +1,119 @@
+/* General Solaris system support.
+   Copyright (C) 2004  Free Software Foundation, Inc.
+   Contributed by CodeSourcery, LLC.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tree.h"
+#include "tm.h"
+#include "tm_p.h"
+#include "toplev.h"
+#include "ggc.h"
+
+tree solaris_pending_aligns, solaris_pending_inits, solaris_pending_finis;
+
+/* Attach any pending attributes for DECL to the list in *ATTRIBUTES.
+   Pending attributes come from #pragma or _Pragma, so this code is
+   only useful in the C family front ends, but it is included in
+   all languages to avoid changing the target machine initializer
+   depending on the language.  */
+
+void
+solaris_insert_attributes (tree decl, tree *attributes)
+{
+  tree *x, next;
+
+  if (solaris_pending_aligns != NULL && TREE_CODE (decl) == VAR_DECL)
+    for (x = &solaris_pending_aligns; *x; x = &TREE_CHAIN (*x))
+      {
+	tree name = TREE_PURPOSE (*x);
+	tree value = TREE_VALUE (*x);
+	if (DECL_NAME (decl) == name)
+	  {
+	    if (lookup_attribute ("aligned", DECL_ATTRIBUTES (decl))
+		|| lookup_attribute ("aligned", *attributes))
+	      warning ("%Jignoring %<#pragma align%> for explicitly "
+		       "aligned %<%D%>", decl, decl);
+	    else
+	      *attributes = tree_cons (get_identifier ("aligned"), value,
+				       *attributes);
+	    next = TREE_CHAIN (*x);
+	    ggc_free (*x);
+	    *x = next;
+	    break;
+	  }
+      }
+
+  if (solaris_pending_inits != NULL && TREE_CODE (decl) == FUNCTION_DECL)
+    for (x = &solaris_pending_inits; *x; x = &TREE_CHAIN (*x))
+      {
+	tree name = TREE_PURPOSE (*x);
+	if (DECL_NAME (decl) == name)
+	  {
+	    *attributes = tree_cons (get_identifier ("init"), NULL,
+				     *attributes);
+	    *attributes = tree_cons (get_identifier ("used"), NULL,
+				     *attributes);
+	    next = TREE_CHAIN (*x);
+	    ggc_free (*x);
+	    *x = next;
+	    break;
+	  }
+      }
+
+  if (solaris_pending_finis != NULL && TREE_CODE (decl) == FUNCTION_DECL)
+    for (x = &solaris_pending_finis; *x; x = &TREE_CHAIN (*x))
+      {
+	tree name = TREE_PURPOSE (*x);
+	if (DECL_NAME (decl) == name)
+	  {
+	    *attributes = tree_cons (get_identifier ("fini"), NULL,
+				     *attributes);
+	    *attributes = tree_cons (get_identifier ("used"), NULL,
+				     *attributes);
+	    next = TREE_CHAIN (*x);
+	    ggc_free (*x);
+	    *x = next;
+	    break;
+	  }
+      }
+}
+
+/* Output initializer or finalizer entries for DECL to FILE.  */
+
+void
+solaris_output_init_fini (FILE *file, tree decl)
+{
+  if (lookup_attribute ("init", DECL_ATTRIBUTES (decl)))
+    {
+      fprintf (file, "\t.pushsection\t\".init\"\n");
+      ASM_OUTPUT_CALL (file, IDENTIFIER_POINTER (DECL_NAME (decl)));
+      fprintf (file, "\t.popsection\n");
+    }
+
+  if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl)))
+    {
+      fprintf (file, "\t.pushsection\t\".fini\"\n");
+      ASM_OUTPUT_CALL (file, IDENTIFIER_POINTER (DECL_NAME (decl)));
+      fprintf (file, "\t.popsection\n");
+    }
+}
+
Index: gcc/config/sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sol2.h,v
retrieving revision 1.13
diff -u -p -r1.13 sol2.h
--- gcc/config/sol2.h	19 Jul 2004 14:47:54 -0000	1.13
+++ gcc/config/sol2.h	19 Jul 2004 22:36:31 -0000
@@ -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;
Index: gcc/config/t-sol2
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-sol2,v
retrieving revision 1.1
diff -u -p -r1.1 t-sol2
--- gcc/config/t-sol2	19 Jul 2004 14:47:54 -0000	1.1
+++ gcc/config/t-sol2	19 Jul 2004 22:36:31 -0000
@@ -1,5 +1,12 @@
-# Solaris-specific format checking
+# Solaris-specific format checking and pragmas
 sol2-c.o: $(srcdir)/config/sol2-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-  tree.h c-format.h intl.h
+  tree.h c-format.h intl.h $(CPPLIB_H) c-pragma.h $(TM_H) $(TM_P_H) \
+  toplev.h $(C_COMMON_H)
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	  $(srcdir)/config/sol2-c.c
+
+# Solaris-specific attributes
+sol2.o: $(srcdir)/config/sol2.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+  tree.h $(TM_H) $(TM_P_H) toplev.h $(GGC_H)
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	  $(srcdir)/config/sol2.c
Index: gcc/config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.694
diff -u -p -r1.694 i386.c
--- gcc/config/i386/i386.c	17 Jul 2004 21:09:11 -0000	1.694
+++ gcc/config/i386/i386.c	19 Jul 2004 22:36:32 -0000
@@ -1082,6 +1082,11 @@ static void init_ext_80387_constants (vo
 #undef TARGET_GIMPLIFY_VA_ARG_EXPR
 #define TARGET_GIMPLIFY_VA_ARG_EXPR ix86_gimplify_va_arg
 
+#ifdef SUBTARGET_INSERT_ATTRIBUTES
+#undef TARGET_INSERT_ATTRIBUTES
+#define TARGET_INSERT_ATTRIBUTES SUBTARGET_INSERT_ATTRIBUTES
+#endif
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 \f
@@ -1613,6 +1618,9 @@ const struct attribute_spec ix86_attribu
 #endif
   { "ms_struct", 0, 0, false, false,  false, ix86_handle_struct_attribute },
   { "gcc_struct", 0, 0, false, false,  false, ix86_handle_struct_attribute },
+#ifdef SUBTARGET_ATTRIBUTE_TABLE
+  SUBTARGET_ATTRIBUTE_TABLE,
+#endif
   { NULL,        0, 0, false, false, false, NULL }
 };
 
Index: gcc/config/i386/sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sol2.h,v
retrieving revision 1.29
diff -u -p -r1.29 sol2.h
--- gcc/config/i386/sol2.h	14 Jun 2004 17:31:27 -0000	1.29
+++ gcc/config/i386/sol2.h	19 Jul 2004 22:36:32 -0000
@@ -79,3 +79,12 @@ Boston, MA 02111-1307, USA.  */
 	fprintf ((FILE), "\n");				\
       }							\
   } while (0)
+
+/* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
+   the bits from config/sol2.c.  */
+#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
+#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
+
+/* Output a simple call for .init/.fini.  */
+#define ASM_OUTPUT_CALL(FILE, NAME)			\
+  fprintf (FILE, "\tcall\t%s\n", NAME)
Index: gcc/config/sparc/elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/elf.h,v
retrieving revision 1.11
diff -u -p -r1.11 elf.h
--- gcc/config/sparc/elf.h	19 Jul 2004 14:47:55 -0000	1.11
+++ gcc/config/sparc/elf.h	19 Jul 2004 22:36:32 -0000
@@ -52,3 +52,13 @@ Boston, MA 02111-1307, USA.  */
 /* Don't include Solaris-specific format checks.  */
 #undef TARGET_N_FORMAT_TYPES
 #undef TARGET_FORMAT_TYPES
+
+/* Don't include Solaris-specific .init / .fini support.  */
+#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);			\
+    }								\
+  while (0)
Index: gcc/config/sparc/sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2.h,v
retrieving revision 1.63
diff -u -p -r1.63 sol2.h
--- gcc/config/sparc/sol2.h	1 Apr 2004 16:05:20 -0000	1.63
+++ gcc/config/sparc/sol2.h	19 Jul 2004 22:36:32 -0000
@@ -156,3 +156,12 @@ Boston, MA 02111-1307, USA.  */
    sparc_override_options will disable V8+ if not generating V9 code.  */
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT (MASK_V8PLUS + MASK_FPU + MASK_LONG_DOUBLE_128)
+
+/* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
+   the bits from config/sol2.c.  */
+#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
+#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
+
+/* Output a simple call for .init/.fini.  */
+#define ASM_OUTPUT_CALL(FILE, NAME)			\
+  fprintf (FILE, "\tcall\t%s\n\t nop\n", NAME)
Index: gcc/config/sparc/sp64-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sp64-elf.h,v
retrieving revision 1.30
diff -u -p -r1.30 sp64-elf.h
--- gcc/config/sparc/sp64-elf.h	19 Jul 2004 14:47:55 -0000	1.30
+++ gcc/config/sparc/sp64-elf.h	19 Jul 2004 22:36:33 -0000
@@ -126,3 +126,13 @@ crtbegin.o%s \
 /* Don't include Solaris-specific format checks.  */
 #undef TARGET_N_FORMAT_TYPES
 #undef TARGET_FORMAT_TYPES
+
+/* Don't include Solaris-specific .init / .fini support.  */
+#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);			\
+    }								\
+  while (0)
Index: gcc/config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.323
diff -u -p -r1.323 sparc.c
--- gcc/config/sparc/sparc.c	17 Jul 2004 21:09:13 -0000	1.323
+++ gcc/config/sparc/sparc.c	19 Jul 2004 22:36:33 -0000
@@ -334,6 +334,9 @@ static bool sparc_strict_argument_naming
 static tree sparc_gimplify_va_arg (tree, tree, tree *, tree *);
 static bool sparc_pass_by_reference (CUMULATIVE_ARGS *,
 				     enum machine_mode, tree, bool);
+#ifdef SUBTARGET_ATTRIBUTE_TABLE
+const struct attribute_spec sparc_attribute_table[];
+#endif
 \f
 /* Option handling.  */
 
@@ -452,6 +455,16 @@ enum processor_type sparc_cpu;
 #undef TARGET_LATE_RTL_PROLOGUE_EPILOGUE
 #define TARGET_LATE_RTL_PROLOGUE_EPILOGUE true
 
+#ifdef SUBTARGET_INSERT_ATTRIBUTES
+#undef TARGET_INSERT_ATTRIBUTES
+#define TARGET_INSERT_ATTRIBUTES SUBTARGET_INSERT_ATTRIBUTES
+#endif
+
+#ifdef SUBTARGET_ATTRIBUTE_TABLE
+#undef TARGET_ATTRIBUTE_TABLE
+#define TARGET_ATTRIBUTE_TABLE sparc_attribute_table
+#endif
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Validate and override various options, and do some machine dependent
@@ -688,6 +701,16 @@ sparc_override_options (void)
     };
 }
 \f
+#ifdef SUBTARGET_ATTRIBUTE_TABLE
+/* Table of valid machine attributes.  */
+const struct attribute_spec sparc_attribute_table[] =
+{
+  /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+  SUBTARGET_ATTRIBUTE_TABLE,
+  { NULL,        0, 0, false, false, false, NULL }
+};
+#endif
+\f
 /* Miscellaneous utilities.  */
 
 /* Nonzero if CODE, a comparison, is suitable for use in v9 conditional move
Index: gcc/doc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.202
diff -u -p -r1.202 extend.texi
--- gcc/doc/extend.texi	19 Jul 2004 14:47:55 -0000	1.202
+++ gcc/doc/extend.texi	19 Jul 2004 22:36:35 -0000
@@ -7247,6 +7247,7 @@ for further explanation.
 * ARM Pragmas::
 * RS/6000 and PowerPC Pragmas::
 * Darwin Pragmas::
+* Solaris Pragmas::
 * Symbol-Renaming Pragmas::
 @end menu
 
@@ -7331,6 +7332,37 @@ that of the @code{unused} attribute, exc
 anywhere within the variables' scopes.
 @end table
 
+@node Solaris Pragmas
+@subsection Solaris Pragmas
+
+The Solaris target supports @code{#pragma redefine_extname}
+(@pxref{Symbol-Renaming Pragmas}).  It also supports additional
+@code{#pragma} directives for compatibility with the system compiler.
+
+@table @code
+@item align @var{alignment} (@var{variable} [, @var{variable}]...)
+@cindex pragma, align
+
+Increase the minimum alignment of each @var{variable} to @var{alignment}.
+This is the same as GCC's @code{aligned} attribute @pxref{Variable
+Attributes}).
+
+@item fini (@var{function} [, @var{function}]...)
+@cindex pragma, fini
+
+This pragma causes each listed @var{function} to be called after
+main, or during shared module unloading, by adding a call to the
+@code{.fini} section.
+
+@item init (@var{function} [, @var{function}]...)
+@cindex pragma, init
+
+This pragma causes each listed @var{function} to be called during
+initialization (before @code{main}) or during shared module loading, by
+adding a call to the @code{.init} section.
+
+@end table
+
 @node Symbol-Renaming Pragmas
 @subsection Symbol-Renaming Pragmas
 
Index: gcc/testsuite/gcc.dg/pragma-align-2.c
===================================================================
RCS file: gcc/testsuite/gcc.dg/pragma-align-2.c
diff -N gcc/testsuite/gcc.dg/pragma-align-2.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/pragma-align-2.c	19 Jul 2004 22:36:36 -0000
@@ -0,0 +1,54 @@
+/* { dg-do run { target *-*-solaris2.* } } */
+
+void abort (void);
+
+#pragma align 1(x1)
+#pragma align 2(x2)
+#pragma align 4(x4)
+#pragma align 8(x8,y8,z8)
+#pragma align 16(x16)
+#pragma align 32(x32)
+#pragma align 64(x64)
+#pragma align 128(x128)
+
+#pragma align 8(not_defined)
+
+#pragma align 9(odd_align)	/* { dg-error "invalid alignment" } */
+#pragma align 256(high_align)	/* { dg-error "invalid alignment" } */
+#pragma align -1(neg_align)	/* { dg-error "malformed" } */
+#pragma align bad_align		/* { dg-error "malformed" } */
+#pragma align 1(bad_align	/* { dg-error "malformed" } */
+
+int x, x1, x2, x4, x8, y8, z8, x16, x32, x64, x128;
+
+#pragma align 16(x)		/* { dg-error "must appear before" } */
+
+int
+main ()
+{
+  if (__alignof__ (x4) < 4)
+    abort ();
+
+  if (__alignof__ (x8) < 8)
+    abort ();
+
+  if (__alignof__ (y8) < 8)
+    abort ();
+
+  if (__alignof__ (z8) < 8)
+    abort ();
+
+  if (__alignof__ (x16) < 16)
+    abort ();
+
+  if (__alignof__ (x32) < 32)
+    abort ();
+
+  if (__alignof__ (x64) < 64)
+    abort ();
+
+  if (__alignof__ (x128) < 128)
+    abort ();
+
+  return 0;
+}
Index: gcc/testsuite/gcc.dg/pragma-align.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/pragma-align.c,v
retrieving revision 1.2
diff -u -p -r1.2 pragma-align.c
--- gcc/testsuite/gcc.dg/pragma-align.c	11 Sep 2000 22:47:05 -0000	1.2
+++ gcc/testsuite/gcc.dg/pragma-align.c	19 Jul 2004 22:36:36 -0000
@@ -1,6 +1,6 @@
 /* Prove that HANDLE_SYSTEMV_PRAGMA alignment handling works somewhat. */
 
-/* { dg-do compile { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* *-*-solaris2.* } } */
 
 struct {
         char one;
@@ -39,4 +39,3 @@ main()
         if(sizeof(resetalign) != sizeof(defaultalign)) abort();
 	return 0;
 }
-
Index: gcc/testsuite/gcc.dg/pragma-init-fini.c
===================================================================
RCS file: gcc/testsuite/gcc.dg/pragma-init-fini.c
diff -N gcc/testsuite/gcc.dg/pragma-init-fini.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/pragma-init-fini.c	19 Jul 2004 22:36:36 -0000
@@ -0,0 +1,50 @@
+/* Tests for #pragma init and #pragma fini.  */
+
+/* { dg-do run { target *-*-solaris2.* } } */
+
+extern void abort ();
+
+#pragma init		/* { dg-error "malformed" } */
+#pragma init ()		/* { dg-error "malformed" } */
+#pragma init init_func	/* { dg-error "malformed" } */
+
+#pragma fini		/* { dg-error "malformed" } */
+#pragma fini ()		/* { dg-error "malformed" } */
+#pragma fini fini_func	/* { dg-error "malformed" } */
+
+#pragma init (init_func, init_static_func)
+
+int glob_1, glob_2;
+
+void init_func (void)
+{
+  glob_1 = 1;
+}
+
+static void init_static_func (void)
+{
+  glob_2 = 2;
+}
+
+#pragma fini (fini_func, fini_static_func)
+
+void fini_func (void)
+{
+
+}
+
+static void fini_static_func (void)
+{
+
+}
+
+int main()
+{
+  if (glob_1 != 1)
+    abort ();
+
+  if (glob_2 != 2)
+    abort ();
+
+  return 0;
+}

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-20 20:33         ` Daniel Jacobowitz
@ 2004-07-20 20:48           ` Mark Mitchell
  2004-07-29 19:31           ` Joern Rennecke
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Mitchell @ 2004-07-20 20:48 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Rainer Orth, gcc-patches

Daniel Jacobowitz wrote:

>On Thu, Jul 15, 2004 at 07:04:45PM -0700, Mark Mitchell wrote:
>  
>
>>Rainer Orth wrote:
>>
>>    
>>
>>>Daniel Jacobowitz writes:
>>>
>>>
>>>
>>>      
>>>
>>>>I've got no problem with enabling the #pragmas for all Solaris 2
>>>>targets.  Would this be acceptable?  They are not vitally necessary,
>>>>and the general trend in GCC is away from #pragma/_Pragma, but they are
>>>>for compatibility with the vendor's compiler and documentation.
>>>>  
>>>>
>>>>        
>>>>
>>>In that case, I cannot see any rationale for supporting them only on
>>>Solaris 10/x86 and up if the vendor compiler provides them on both SPARC
>>>and x86 and well before Solaris 10.  That would be even more confusing to
>>>users than not supporting them at all.
>>>
>>>      
>>>
>>Yes, I think that if the vendor compiler has supported them for a long 
>>time, we should just put them into generic Solaris 2 support.
>>    
>>
>
>Here is a patch which adds #pragma align, #pragma init, and #pragma
>fini to all Solaris targets.
>  
>
That all looks reasonable to me.  If nobody else indicates otherwise, 
it's OK.

>/scratch/dan/gcc/gcc/gengtype.c: In function `do_scalar_typedef':
>/scratch/dan/gcc/gcc/gengtype.c:134: internal compiler error: in schedule_insns, at sched-rgn.c:2744
>Please submit a full bug report,
>with preprocessed source if appropriate.
>See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>make[2]: *** [gengtype.o] Error 1
>
>I have never bootstrapped on this machine before so I figure I'll poll
>in case that error looks familiar to anyone else before I start poking
>at it; that appears to be a mismatch in the number of death notes in a
>region.
>
That's not familiar to me...

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [csl-sol210-branch] Add some Solaris #pragmas
  2004-07-20 20:33         ` Daniel Jacobowitz
  2004-07-20 20:48           ` Mark Mitchell
@ 2004-07-29 19:31           ` Joern Rennecke
  1 sibling, 0 replies; 8+ messages in thread
From: Joern Rennecke @ 2004-07-29 19:31 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Mark Mitchell, Rainer Orth, gcc-patches

> /scratch/dan/gcc/gcc/gengtype.c: In function `do_scalar_typedef':
> /scratch/dan/gcc/gcc/gengtype.c:134: internal compiler error: in schedule_insns, at sched-rgn.c:2744
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[2]: *** [gengtype.o] Error 1
> 
> I have never bootstrapped on this machine before so I figure I'll poll
> in case that error looks familiar to anyone else before I start poking
> at it; that appears to be a mismatch in the number of death notes in a
> region.

I've seen this happen for lots of reasons.

- An earlier optimization pass still used the original semantics of REG_DEAD
  notes, i.e. they used to be optional.
- A previous life update did not do as much work as it should have.
- A splitter had a side effect that the splitting machinery didn't anticipate.
  E.g. a value can become completely dead because it is not actually needed
  for a special case of a computation.
- A splitter did a nonsentical transformation, e.g. replacing the wrong
  registers, or trying to do a transformation, giving up, and not properly
  undoing all changes.
- delete_trivially_dead_insns is better at deleting dead loops than
  update_life_info is, so it should clean up life info too.  I haven't
  submitted a patch for this because it would either depend on or conflict
  with this patch:

http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01037.html

  and I am still waiting for a review of this patch (and a number of other
  patches, too).

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-07-29 11:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-13 23:06 [csl-sol210-branch] Add some Solaris #pragmas Daniel Jacobowitz
2004-07-14 19:56 ` Rainer Orth
2004-07-14 22:46   ` Daniel Jacobowitz
2004-07-14 23:10     ` Rainer Orth
2004-07-16  9:52       ` Mark Mitchell
2004-07-20 20:33         ` Daniel Jacobowitz
2004-07-20 20:48           ` Mark Mitchell
2004-07-29 19:31           ` Joern Rennecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).