$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/10/07 20:09:44 landry Exp $
--- gcc/config/sparc/openbsd64.h.orig	Sat Sep  1 17:28:30 2007
+++ gcc/config/sparc/openbsd64.h	Sat Oct  6 12:27:35 2012
@@ -50,15 +50,20 @@ along with GCC; see the file COPYING3.  If not see
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
 
-/* Inherited from sp64-elf.  */
-#undef NO_IMPLICIT_EXTERN_C
-
 #undef ASM_SPEC
+#ifdef PIE_DEFAULT
 #define ASM_SPEC "\
+%{v:-V} -s %{fpic|fPIC:-K PIC} %{!fno-pie: %{!p: %{!pg: -K PIC}}} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch) \
+"
+#else
+#define ASM_SPEC "\
 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
 %{mlittle-endian:-EL} \
 %(asm_cpu) %(asm_arch) \
 "
+#endif
 
 /* Layout of source language data types.  */
 #undef WCHAR_TYPE
