home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lyx-0.13.2.tar.gz / lyx-0.13.2.tar / lyx-0.13.2 / config / hack-gcc < prev    next >
Text File  |  1998-04-23  |  593b  |  22 lines

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