games/dungeon: Fixed segfaults.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2014-02-16 08:45:35 +07:00 committed by Willy Sudiarto Raharjo
parent c806a412c9
commit 77123788f2

View file

@ -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