From f638fdfe1d9de1307355c8074fbff9c28342c0ef Mon Sep 17 00:00:00 2001 From: "dons@cse.unsw.edu.au" Date: Fri, 28 Apr 2006 07:48:11 +0000 Subject: [PATCH] Fix stage2 segfault on openbsd. Somewhere along the 6.5 branch, gcc started compiling the rts such that it triggers the stack smash handler, causing stage2 to by kill'd immediately. This turns off the stack protector, which will do for now. --- rts/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rts/Makefile b/rts/Makefile index 2319788..67201cd 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -328,6 +328,11 @@ else PrimOps_HC_OPTS += -\#include posix/Itimer.h endif +# Otherwise the stack-smash handler gets triggered. +ifeq "$(TargetOS_CPP)" "openbsd" +SRC_HC_OPTS += -optc-fno-stack-protector +endif + # -O3 helps unroll some loops (especially in copy() with a constant argument). # -fno-strict-aliasing is a hack because we often mix StgPtr and StgClosure pointers # to the same object, and gcc will assume these don't alias. eg. it happens in -- 1.7.10.4