patch-gcc_config_openbsd_h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
  2. --- gcc/config/openbsd.h.orig Mon Aug 19 14:21:26 2013
  3. +++ gcc/config/openbsd.h Mon Dec 2 12:20:02 2013
  4. @@ -108,9 +108,9 @@ while (0)
  5. This two-stage defines makes it easy to pick that for targets that
  6. have subspecs. */
  7. #ifdef CPP_CPU_SPEC
  8. -#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
  9. +#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
  10. #else
  11. -#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
  12. +#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
  13. #endif
  14. #undef LIB_SPEC
  15. @@ -284,6 +284,16 @@ do { \
  16. #endif
  17. /* Storage layout. */
  18. +
  19. +/*
  20. + * Disable the use of unsafe builtin functions, (strcat, strcpy, stpcpy),
  21. + * making them easier to spot in the object files.
  22. + */
  23. +#define NO_UNSAFE_BUILTINS
  24. +
  25. +/* The system headers on OpenBSD are C++-aware. */
  26. +#undef NO_IMPLICIT_EXTERN_C
  27. +#define NO_IMPLICIT_EXTERN_C
  28. #define HAVE_ENABLE_EXECUTE_STACK