From 77123788f2219cd7ea78a7682eb9b5487282074c Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 16 Feb 2014 08:45:35 +0700 Subject: games/dungeon: Fixed segfaults. Signed-off-by: Willy Sudiarto Raharjo --- games/dungeon/dungeon.SlackBuild | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'games') diff --git a/games/dungeon/dungeon.SlackBuild b/games/dungeon/dungeon.SlackBuild index 82025f5a8d8db..d07273e64884a 100644 --- a/games/dungeon/dungeon.SlackBuild +++ b/games/dungeon/dungeon.SlackBuild @@ -8,7 +8,7 @@ PRGNAM=dungeon VERSION=${VERSION:-19800808} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -24,17 +24,25 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# NOTE: Nonstandard flags here. +# On 14.0, we used -O2 and everything was fine. On 14.1, using -O2 +# causes a segfault on 'open mailbox' or 'examine mailbox'... but +# it doesn't happen with any of -O0 -O1 -O3. I'm not a Fortran guru, +# so I can't say whether the bug is in dungeon or gfortran. So to +# be on the safe side, this script uses -O0 to completely disable +# the optimizer. + if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKCFLAGS="-O0 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-O0 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O0 -fPIC" LIBDIRSUFFIX="64" else - SLKCFLAGS="-O2" + SLKCFLAGS="-O0" LIBDIRSUFFIX="" fi -- cgit v1.2.3