openbsd-ports/lang/gcc/4.6/patches/patch-gcc_builtins_c
pascal e7f261aa15 Update to gcc 4.6.3.
Also, sync a bit with base gcc:
- disable unsafe builtins
- disable -Wpointer-sign in -Wall
- move -fstrict-aliasing to -O3, disable -fstrict-overflow and
  -fdelete-null-pointer-checks
- enable -Wsystem-headers
- default to march=i486 on i386
- fix crtsavres on powerpc
- sync sparc64 config
- implement -Wvariable-decl, -Wstack-larger-than-N (alpha, amd64, i386, sparc,
  sparc64), -Wtrampolines, -ftrampolines
- default to -fno-ident
- fix -rdynamic by passing -export-dynamic to ld(1)

some bits from Brad, others from me.

tested by myself and jsg@, adastrap now hosted by sthen@ (thanks).

ok jsg@ sthen@
2012-03-31 20:02:03 +00:00

28 lines
748 B
Plaintext

$OpenBSD: patch-gcc_builtins_c,v 1.1 2012/03/31 20:02:03 pascal Exp $
--- gcc/builtins.c.orig Sun Mar 11 19:11:50 2012
+++ gcc/builtins.c Sun Mar 11 19:12:42 2012
@@ -6112,9 +6112,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, e
break;
case BUILT_IN_STRCPY:
+#ifndef NO_UNSAFE_BUILTINS
target = expand_builtin_strcpy (exp, target);
if (target)
return target;
+#endif
break;
case BUILT_IN_STRNCPY:
@@ -6124,9 +6126,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, e
break;
case BUILT_IN_STPCPY:
+#ifndef NO_UNSAFE_BUILTINS
target = expand_builtin_stpcpy (exp, target, mode);
if (target)
return target;
+#endif
break;
case BUILT_IN_MEMCPY: