$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.1.1.1 2012/04/23 15:56:42 pascal Exp $
--- gcc/config/sparc/openbsd64.h.orig	Tue Oct 25 10:57:25 2011
+++ gcc/config/sparc/openbsd64.h	Mon Apr  2 16:38:17 2012
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  If not see
 /* XXX - do we really want HARD_QUAD? */
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT \
-(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
+(MASK_V9 + MASK_PTR64 + MASK_64BIT + /* MASK_HARD_QUAD */ \
  + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
 
 #undef SPARC_DEFAULT_CMODEL
@@ -30,10 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #define TARGET_OS_CPP_BUILTINS()		\
   do						\
     {						\
-	builtin_define ("__unix__");		\
-	builtin_define ("__OpenBSD__");		\
-	builtin_assert ("system=unix");		\
-	builtin_assert ("system=OpenBSD");	\
+	OPENBSD_OS_CPP_BUILTINS();		\
 	builtin_define ("__sparc64__");		\
 	builtin_define ("__sparcv9__");		\
 	builtin_define ("__sparc_v9__");	\
@@ -60,6 +57,15 @@ along with GCC; see the file COPYING3.  If not see
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 32
 
+#undef WINT_TYPE
+#define WINT_TYPE "int"
+
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
 #undef LONG_DOUBLE_TYPE_SIZE
 #define LONG_DOUBLE_TYPE_SIZE 128
 
@@ -69,6 +75,7 @@ along with GCC; see the file COPYING3.  If not see
    %{shared:-shared} %{R*} \
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
+   %{rdynamic:-export-dynamic} \
    %{assert*} \
    -dynamic-linker /usr/libexec/ld.so"
 
