lyx_mirror/config/hack-gcc
Lars Gullik Bjønnes 27de1486ca Initial revision
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@140 a592a061-630c-0410-9148-cb99ea01b6c8
1999-09-27 18:44:28 +00:00

22 lines
593 B
Bash
Executable File

#!/bin/sh
# This is hack-gcc, an ugly hack to force gcc to recompile without
# optimization when an error occurs. It is meant as wrapper around gcc
# that works around compiler bugs when optimization is on . Do what
# you want with this code.
# Author Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
ARGS=`echo "$*" | sed -e 's/\"/\\\"/g`
if test "x$ARGS" = x ; then
echo "usage: $0 [gcc name] [normal gcc options]"
exit 0
fi
if eval "$ARGS" ; then
exit 0
else
echo "$0: an error occurred, retrying without optimization." >&2
eval `echo $ARGS | sed -e 's/-O[0-9]*//'`
fi