openbsd-ports/lang/gcc/4.7/patches/patch-gcc_config_openbsd_h
landry 5b823cb084 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@
2012-10-07 20:09:44 +00:00

33 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$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 Sat Oct 6 12:46:28 2012
@@ -109,9 +109,9 @@ while (0)
This two-stage defines makes it easy to pick that for targets that
have subspecs. */
#ifdef CPP_CPU_SPEC
-#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#else
-#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif
#undef LIB_SPEC
@@ -279,6 +279,16 @@ do { \
#endif
/* Storage layout. */
+
+/*
+ * 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
#define HAVE_ENABLE_EXECUTE_STACK