openbsd-ports/lang/gcc/4.6/patches/patch-gcc_toplev_c
pascal 72bbe18ad2 - modify stack protection to work with our native libc routines, passing the
function name to __stack_smash_handler.  Only supported for "c-family"
  languages at the moment.
- enable it per default on archs where FRAME_GROWS_DOWNWARD
- remove obsolete comment about adastrap needing a specific libc
- -java actually needs a runtime dep on -main for -lgcc

ok espie@
2012-02-16 21:30:15 +00:00

13 lines
578 B
Plaintext

$OpenBSD: patch-gcc_toplev_c,v 1.1 2012/02/16 21:30:15 pascal Exp $
--- gcc/toplev.c.orig Fri Jan 20 14:23:40 2012
+++ gcc/toplev.c Fri Jan 20 14:24:30 2012
@@ -1580,6 +1580,8 @@ process_options (void)
/* Targets must be able to place spill slots at lower addresses. If the
target already uses a soft frame pointer, the transition is trivial. */
+ if (flag_stack_protect == -1)
+ flag_stack_protect = FRAME_GROWS_DOWNWARD ? 1 : 0;
if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
{
warning (0, "-fstack-protector not supported for this target");