Sync the config/openbsd.h and config/sparc/openbsd64.h patches with

respectively r1.9 and r1.6 of base gcc ones adding #define
NO_IMPLICIT_EXTERN_C. While here add the missing #define
NO_UNSAFE_BUILTINS to gfortran/gcc 4.2, Bump all REVISIONs.
ok sthen@
This commit is contained in:
landry 2012-10-07 20:09:44 +00:00
parent d66aca4ccf
commit 5b823cb084
14 changed files with 135 additions and 66 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.63 2012/09/28 15:02:28 pascal Exp $ # $OpenBSD: Makefile,v 1.64 2012/10/07 20:09:44 landry Exp $
ONLY_FOR_ARCHS = alpha amd64 i386 m68k sparc sparc64 powerpc vax ONLY_FOR_ARCHS = alpha amd64 i386 m68k sparc sparc64 powerpc vax
@ -23,13 +23,13 @@ SHARED_LIBS = estdc++ 7.0 \
objc 2.0 \ objc 2.0 \
objc_gc 2.0 objc_gc 2.0
REVISION-main = 6 REVISION-main = 7
REVISION-c++ = 8 REVISION-c++ = 9
REVISION-estdc = 2 REVISION-estdc = 3
REVISION-g77 = 7 REVISION-g77 = 8
REVISION-java = 7 REVISION-java = 8
REVISION-objc = 7 REVISION-objc = 8
REVISION-ada = 7 REVISION-ada = 8
EPOCH = 0 EPOCH = 0
MAINTAINER = Marc Espie <espie@openbsd.org> MAINTAINER = Marc Espie <espie@openbsd.org>

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.3 2012/09/01 00:00:32 pascal Exp $ $OpenBSD: patch-gcc_config_openbsd_h,v 1.4 2012/10/07 20:09:44 landry Exp $
--- gcc/config/openbsd.h.orig Tue Nov 26 05:54:46 2002 --- gcc/config/openbsd.h.orig Tue Nov 26 05:54:46 2002
+++ gcc/config/openbsd.h Thu Aug 30 10:36:59 2012 +++ gcc/config/openbsd.h Sat Oct 6 12:10:49 2012
@@ -52,20 +52,20 @@ Boston, MA 02111-1307, USA. */ @@ -52,20 +52,20 @@ Boston, MA 02111-1307, USA. */
#ifdef OPENBSD_NATIVE #ifdef OPENBSD_NATIVE
@ -98,7 +98,7 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.3 2012/09/01 00:00:32 pascal Exp $
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC OBSD_LIB_SPEC #define LIB_SPEC OBSD_LIB_SPEC
#endif #endif
@@ -279,13 +309,17 @@ do { \ @@ -279,13 +309,21 @@ do { \
/* Storage layout. */ /* Storage layout. */
@ -117,6 +117,10 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.3 2012/09/01 00:00:32 pascal Exp $
+ */ + */
+#define NO_UNSAFE_BUILTINS +#define NO_UNSAFE_BUILTINS
+ +
+/* The system headers on OpenBSD are C++-aware. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
+
+/* pick up defines for mprotect (used in TRANSFER_FROM_TRAMPOLINE) */ +/* pick up defines for mprotect (used in TRANSFER_FROM_TRAMPOLINE) */
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/mman.h> +#include <sys/mman.h>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.85 2012/09/28 15:02:28 pascal Exp $ # $OpenBSD: Makefile,v 1.86 2012/10/07 20:09:44 landry Exp $
ONLY_FOR_ARCHS = alpha i386 m68k sparc sparc64 powerpc vax amd64 ONLY_FOR_ARCHS = alpha i386 m68k sparc sparc64 powerpc vax amd64
#BROKEN=adjust for types changes #BROKEN=adjust for types changes
@ -20,13 +20,13 @@ PKGNAME-java = gcj-${FULL_PKGVERSION}
PKGNAME-objc = gobjc-${FULL_PKGVERSION} PKGNAME-objc = gobjc-${FULL_PKGVERSION}
PKGNAME-ada = gnat-${FULL_PKGVERSION} PKGNAME-ada = gnat-${FULL_PKGVERSION}
REVISION-main = 12 REVISION-main = 13
REVISION-c++ = 16 REVISION-c++ = 17
REVISION-estdc = 4 REVISION-estdc = 5
REVISION-f95 = 14 REVISION-f95 = 15
REVISION-java = 14 REVISION-java = 15
REVISION-objc = 13 REVISION-objc = 14
REVISION-ada = 12 REVISION-ada = 11
EPOCH = 0 EPOCH = 0
SHARED_LIBS = estdc++ 13.0 \ SHARED_LIBS = estdc++ 13.0 \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.4 2012/04/23 14:12:19 pascal Exp $ $OpenBSD: patch-gcc_config_openbsd_h,v 1.5 2012/10/07 20:09:44 landry Exp $
--- gcc/config/openbsd.h.orig Sat Sep 1 17:28:30 2007 --- gcc/config/openbsd.h.orig Sat Sep 1 17:28:30 2007
+++ gcc/config/openbsd.h Thu Apr 12 14:34:24 2012 +++ gcc/config/openbsd.h Sat Oct 6 12:37:31 2012
@@ -72,6 +72,37 @@ along with GCC; see the file COPYING3. If not see @@ -72,6 +72,37 @@ along with GCC; see the file COPYING3. If not see
/* Controlling the compilation driver. */ /* Controlling the compilation driver. */
@ -76,7 +76,7 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.4 2012/04/23 14:12:19 pascal Exp $
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC OBSD_LIB_SPEC #define LIB_SPEC OBSD_LIB_SPEC
#endif #endif
@@ -281,15 +309,14 @@ do { \ @@ -281,16 +309,15 @@ do { \
/* Storage layout. */ /* Storage layout. */
@ -89,9 +89,27 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.4 2012/04/23 14:12:19 pascal Exp $
work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly,
as this depends on a few other details as well... */ as this depends on a few other details as well... */
#define HANDLE_SYSV_PRAGMA 1 #define HANDLE_SYSV_PRAGMA 1
+
+/* Define this so we can compile MS code for use with WINE. */ +/* Define this so we can compile MS code for use with WINE. */
+#define HANDLE_PRAGMA_PACK_PUSH_POP +#define HANDLE_PRAGMA_PACK_PUSH_POP
+
/* Stack is explicitly denied execution rights on OpenBSD platforms. */ /* Stack is explicitly denied execution rights on OpenBSD platforms. */
#define ENABLE_EXECUTE_STACK \ #define ENABLE_EXECUTE_STACK \
extern void __enable_execute_stack (void *); \
@@ -305,6 +332,16 @@ __enable_execute_stack (void *addr) \
if (mprotect (page, end - page, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) \
perror ("mprotect of trampoline code"); \
}
+
+/*
+ * Disable the use of unsafe builtin functions, (strcat, strcpy, stpcpy),
+ * making them easier to spot in the object files.
+ */
+#define NO_UNSAFE_BUILTINS
+
+/* The system headers on OpenBSD are C++-aware. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
#include <sys/types.h>
#include <sys/mman.h>

View File

@ -1,9 +1,13 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.1 2012/09/01 00:00:32 pascal Exp $ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/10/07 20:09:44 landry Exp $
--- gcc/config/sparc/openbsd64.h.orig Fri Aug 31 16:10:51 2012 --- gcc/config/sparc/openbsd64.h.orig Sat Sep 1 17:28:30 2007
+++ gcc/config/sparc/openbsd64.h Fri Aug 31 16:12:07 2012 +++ gcc/config/sparc/openbsd64.h Sat Oct 6 12:27:35 2012
@@ -54,11 +54,19 @@ along with GCC; see the file COPYING3. If not see @@ -50,15 +50,20 @@ along with GCC; see the file COPYING3. If not see
#undef NO_IMPLICIT_EXTERN_C #undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
-/* Inherited from sp64-elf. */
-#undef NO_IMPLICIT_EXTERN_C
-
#undef ASM_SPEC #undef ASM_SPEC
+#ifdef PIE_DEFAULT +#ifdef PIE_DEFAULT
#define ASM_SPEC "\ #define ASM_SPEC "\

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.37 2012/09/28 15:02:29 pascal Exp $ # $OpenBSD: Makefile,v 1.38 2012/10/07 20:09:44 landry Exp $
ONLY_FOR_ARCHS = amd64 i386 powerpc sparc sparc64 ONLY_FOR_ARCHS = amd64 i386 powerpc sparc sparc64
DPB_PROPERTIES = parallel DPB_PROPERTIES = parallel
@ -20,14 +20,14 @@ PKGNAME-ada = gnat-${FULL_PKGVERSION}
PKGNAME-go = gccgo-${FULL_PKGVERSION} PKGNAME-go = gccgo-${FULL_PKGVERSION}
PKGSPEC-main = gcc->=4.6,<4.7 PKGSPEC-main = gcc->=4.6,<4.7
REVISION-main = 11 REVISION-main = 12
REVISION-c++ = 11 REVISION-c++ = 12
REVISION-estdc = 9 REVISION-estdc = 10
REVISION-f95 = 11 REVISION-f95 = 12
REVISION-java = 11 REVISION-java = 12
REVISION-objc = 11 REVISION-objc = 12
REVISION-ada = 11 REVISION-ada = 12
REVISION-go = 11 REVISION-go = 12
SHARED_LIBS = estdc++ 14.0 \ SHARED_LIBS = estdc++ 14.0 \
gfortran 3.0 \ gfortran 3.0 \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2012/04/23 14:16:34 pascal Exp $ $OpenBSD: patch-gcc_config_openbsd_h,v 1.3 2012/10/07 20:09:45 landry Exp $
--- gcc/config/openbsd.h.orig Wed Dec 22 13:06:01 2010 --- gcc/config/openbsd.h.orig Wed Dec 22 13:06:01 2010
+++ gcc/config/openbsd.h Thu Apr 12 14:17:05 2012 +++ gcc/config/openbsd.h Sat Oct 6 12:11:38 2012
@@ -109,9 +109,9 @@ while (0) @@ -109,9 +109,9 @@ while (0)
This two-stage defines makes it easy to pick that for targets that This two-stage defines makes it easy to pick that for targets that
have subspecs. */ have subspecs. */
@ -13,7 +13,7 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2012/04/23 14:16:34 pascal Exp $
#endif #endif
#undef LIB_SPEC #undef LIB_SPEC
@@ -295,6 +295,12 @@ __enable_execute_stack (void *addr) \ @@ -295,6 +295,16 @@ __enable_execute_stack (void *addr) \
if (mprotect (page, end - page, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) \ if (mprotect (page, end - page, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) \
perror ("mprotect of trampoline code"); \ perror ("mprotect of trampoline code"); \
} }
@ -23,6 +23,10 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2012/04/23 14:16:34 pascal Exp $
+ * making them easier to spot in the object files. + * making them easier to spot in the object files.
+ */ + */
+#define NO_UNSAFE_BUILTINS +#define NO_UNSAFE_BUILTINS
+
+/* The system headers on OpenBSD are C++-aware. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
#include <sys/types.h> #include <sys/types.h>
#include <sys/mman.h> #include <sys/mman.h>

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.3 2012/09/01 00:00:32 pascal Exp $ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.4 2012/10/07 20:09:45 landry Exp $
--- gcc/config/sparc/openbsd64.h.orig Thu Dec 9 17:31:47 2010 --- gcc/config/sparc/openbsd64.h.orig Thu Dec 9 17:31:47 2010
+++ gcc/config/sparc/openbsd64.h Thu Aug 30 10:08:05 2012 +++ gcc/config/sparc/openbsd64.h Sat Oct 6 12:10:31 2012
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
/* XXX - do we really want HARD_QUAD? */ /* XXX - do we really want HARD_QUAD? */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
@ -22,9 +22,13 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.3 2012/09/01 00:00:32 pascal Ex
builtin_define ("__sparc64__"); \ builtin_define ("__sparc64__"); \
builtin_define ("__sparcv9__"); \ builtin_define ("__sparcv9__"); \
builtin_define ("__sparc_v9__"); \ builtin_define ("__sparc_v9__"); \
@@ -51,11 +48,19 @@ along with GCC; see the file COPYING3. If not see @@ -47,15 +44,20 @@ along with GCC; see the file COPYING3. If not see
#undef NO_IMPLICIT_EXTERN_C #undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC ""
-/* Inherited from sp64-elf. */
-#undef NO_IMPLICIT_EXTERN_C
-
#undef ASM_SPEC #undef ASM_SPEC
+#ifdef PIE_DEFAULT +#ifdef PIE_DEFAULT
#define ASM_SPEC "\ #define ASM_SPEC "\
@ -42,7 +46,7 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.3 2012/09/01 00:00:32 pascal Ex
/* Layout of source language data types. */ /* Layout of source language data types. */
#undef WCHAR_TYPE #undef WCHAR_TYPE
@@ -64,6 +69,15 @@ along with GCC; see the file COPYING3. If not see @@ -64,6 +66,15 @@ along with GCC; see the file COPYING3. If not see
#undef WCHAR_TYPE_SIZE #undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32 #define WCHAR_TYPE_SIZE 32
@ -58,7 +62,7 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.3 2012/09/01 00:00:32 pascal Ex
#undef LONG_DOUBLE_TYPE_SIZE #undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128 #define LONG_DOUBLE_TYPE_SIZE 128
@@ -73,6 +87,7 @@ along with GCC; see the file COPYING3. If not see @@ -73,6 +84,7 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \ %{shared:-shared} %{R*} \
%{static:-Bstatic} \ %{static:-Bstatic} \
%{!static:-Bdynamic} \ %{!static:-Bdynamic} \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.18 2012/09/28 18:45:42 pascal Exp $ # $OpenBSD: Makefile,v 1.19 2012/10/07 20:09:45 landry Exp $
ONLY_FOR_ARCHS = amd64 i386 powerpc sparc64 ONLY_FOR_ARCHS = amd64 i386 powerpc sparc64
BROKEN-sparc64 = ICE in libgcc BROKEN-sparc64 = ICE in libgcc
@ -22,6 +22,13 @@ PKGNAME-ada = gnat-${FULL_PKGVERSION}
#PKGNAME-go = gccgo-${FULL_PKGVERSION} #PKGNAME-go = gccgo-${FULL_PKGVERSION}
PKGSPEC-main = gcc->=4.7,<4.8 PKGSPEC-main = gcc->=4.7,<4.8
REVISION-main = 0
REVISION-c++ = 0
REVISION-estdc = 0
REVISION-f95 = 0
REVISION-objc = 0
REVISION-ada = 0
SHARED_LIBS = estdc++ 15.0 \ SHARED_LIBS = estdc++ 15.0 \
gfortran 4.0 \ gfortran 4.0 \
gcj 2.0 \ gcj 2.0 \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2012/04/23 15:56:42 pascal Exp $ $OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2012/10/07 20:09:45 landry Exp $
--- gcc/config/openbsd.h.orig Tue Oct 18 01:31:25 2011 --- gcc/config/openbsd.h.orig Tue Oct 18 01:31:25 2011
+++ gcc/config/openbsd.h Sat Apr 14 13:14:06 2012 +++ gcc/config/openbsd.h Sat Oct 6 12:46:28 2012
@@ -109,9 +109,9 @@ while (0) @@ -109,9 +109,9 @@ while (0)
This two-stage defines makes it easy to pick that for targets that This two-stage defines makes it easy to pick that for targets that
have subspecs. */ have subspecs. */
@ -13,7 +13,7 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2012/04/23 15:56:42 pascal Exp $
#endif #endif
#undef LIB_SPEC #undef LIB_SPEC
@@ -279,6 +279,12 @@ do { \ @@ -279,6 +279,16 @@ do { \
#endif #endif
/* Storage layout. */ /* Storage layout. */
@ -23,6 +23,10 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2012/04/23 15:56:42 pascal Exp $
+ * making them easier to spot in the object files. + * making them easier to spot in the object files.
+ */ + */
+#define NO_UNSAFE_BUILTINS +#define NO_UNSAFE_BUILTINS
+
+/* The system headers on OpenBSD are C++-aware. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
#define HAVE_ENABLE_EXECUTE_STACK #define HAVE_ENABLE_EXECUTE_STACK

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/09/01 00:00:32 pascal Exp $ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.3 2012/10/07 20:09:45 landry Exp $
--- gcc/config/sparc/openbsd64.h.orig Tue Oct 25 10:57:25 2011 --- gcc/config/sparc/openbsd64.h.orig Tue Oct 25 10:57:25 2011
+++ gcc/config/sparc/openbsd64.h Thu Aug 30 10:04:27 2012 +++ gcc/config/sparc/openbsd64.h Sat Oct 6 12:45:48 2012
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see @@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
/* XXX - do we really want HARD_QUAD? */ /* XXX - do we really want HARD_QUAD? */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
@ -22,9 +22,13 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/09/01 00:00:32 pascal Ex
builtin_define ("__sparc64__"); \ builtin_define ("__sparc64__"); \
builtin_define ("__sparcv9__"); \ builtin_define ("__sparcv9__"); \
builtin_define ("__sparc_v9__"); \ builtin_define ("__sparc_v9__"); \
@@ -48,10 +45,17 @@ along with GCC; see the file COPYING3. If not see @@ -44,14 +41,18 @@ along with GCC; see the file COPYING3. If not see
#undef NO_IMPLICIT_EXTERN_C #undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC ""
-/* Inherited from sp64-elf. */
-#undef NO_IMPLICIT_EXTERN_C
-
#undef ASM_SPEC #undef ASM_SPEC
+#ifdef PIE_DEFAULT +#ifdef PIE_DEFAULT
#define ASM_SPEC "\ #define ASM_SPEC "\
@ -40,7 +44,7 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/09/01 00:00:32 pascal Ex
/* Layout of source language data types. */ /* Layout of source language data types. */
#undef WCHAR_TYPE #undef WCHAR_TYPE
@@ -60,6 +64,15 @@ along with GCC; see the file COPYING3. If not see @@ -60,6 +61,15 @@ along with GCC; see the file COPYING3. If not see
#undef WCHAR_TYPE_SIZE #undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32 #define WCHAR_TYPE_SIZE 32
@ -56,7 +60,7 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/09/01 00:00:32 pascal Ex
#undef LONG_DOUBLE_TYPE_SIZE #undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128 #define LONG_DOUBLE_TYPE_SIZE 128
@@ -69,6 +82,7 @@ along with GCC; see the file COPYING3. If not see @@ -69,6 +79,7 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \ %{shared:-shared} %{R*} \
%{static:-Bstatic} \ %{static:-Bstatic} \
%{!static:-Bdynamic} \ %{!static:-Bdynamic} \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.15 2012/09/01 00:00:32 pascal Exp $ # $OpenBSD: Makefile,v 1.16 2012/10/07 20:09:44 landry Exp $
ONLY_FOR_ARCHS = ${GCC4_ARCHS} ONLY_FOR_ARCHS = ${GCC4_ARCHS}
SYSV = 4.2.1 SYSV = 4.2.1
@ -12,7 +12,7 @@ PKGNAME-main = gfortran-$V
PKGNAME-lib = libgfortran-$V PKGNAME-lib = libgfortran-$V
SHARED_LIBS = gfortran 2.0 SHARED_LIBS = gfortran 2.0
REVISION = 5 REVISION = 6
CATEGORIES = lang math CATEGORIES = lang math

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $ $OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2012/10/07 20:09:44 landry Exp $
--- gcc/config/openbsd.h.orig Sat Jun 25 03:22:41 2005 --- gcc/config/openbsd.h.orig Sat Jun 25 03:22:41 2005
+++ gcc/config/openbsd.h Mon Jun 14 19:23:04 2010 +++ gcc/config/openbsd.h Sat Oct 6 12:43:05 2012
@@ -73,6 +73,37 @@ Boston, MA 02110-1301, USA. */ @@ -73,6 +73,37 @@ Boston, MA 02110-1301, USA. */
/* Controlling the compilation driver. */ /* Controlling the compilation driver. */
@ -80,3 +80,19 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
/* bug work around: we don't want to support #pragma weak, but the current /* bug work around: we don't want to support #pragma weak, but the current
code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to
work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly,
@@ -307,5 +331,15 @@ __enable_execute_stack (void *addr) \
perror ("mprotect of trampoline code"); \
}
+/* Disable the use of unsafe builtin functions, (strcat, strcpy), making
+ * them easier to spot in the object files.
+ */
+#define NO_UNSAFE_BUILTINS
+
+/* The system headers on OpenBSD are C++-aware. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
+
+/* pick up defines for mprotect (used in TRANSFER_FROM_TRAMPOLINE) */
#include <sys/types.h>
#include <sys/mman.h>

View File

@ -1,9 +1,13 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.1 2012/09/01 00:00:33 pascal Exp $ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2012/10/07 20:09:44 landry Exp $
--- gcc/config/sparc/openbsd64.h.orig Thu Aug 30 11:34:04 2012 --- gcc/config/sparc/openbsd64.h.orig Sat Jun 25 03:22:41 2005
+++ gcc/config/sparc/openbsd64.h Thu Aug 30 11:33:10 2012 +++ gcc/config/sparc/openbsd64.h Sat Oct 6 12:41:58 2012
@@ -55,11 +55,19 @@ Boston, MA 02110-1301, USA. */ @@ -51,15 +51,20 @@ Boston, MA 02110-1301, USA. */
#undef NO_IMPLICIT_EXTERN_C #undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
-/* Inherited from sp64-elf. */
-#undef NO_IMPLICIT_EXTERN_C
-
#undef ASM_SPEC #undef ASM_SPEC
+#ifdef PIE_DEFAULT +#ifdef PIE_DEFAULT
#define ASM_SPEC "\ #define ASM_SPEC "\