Branch: Tag:

2002-04-30

2002-04-30 20:02:03 by Martin Stjernholm <mast@lysator.liu.se>

Added a configuration option --disable-noopt-retry that disables the
compilation retries without optimization in the .c.o targets.

Rev: src/Makefile.in:1.305
Rev: src/configure.in:1.584
Rev: src/modules/dynamic_module_makefile.in:1.92
Rev: src/modules/static_module_makefile.in:1.83

1:   # - # $Id: Makefile.in,v 1.304 2002/04/30 19:38:49 mast Exp $ + # $Id: Makefile.in,v 1.305 2002/04/30 20:02:02 mast Exp $   #      # This line is needed on some machines.
336:   # First try compiling with optimization and if that doesn't work, without.   # GCC dumps core on some files @ OSF1   # This kluge should work around that... - # FIXME: Make this a configure option +    .c.o:    @echo "Compiling $<" ;\    rm -f $@.fail >/dev/null 2>&1; \    if $(CC) $(CFLAGS) -c $< -o $@ ; then : ; else \ -  +  status=$$?; \ +  if test x"@noopt_retry@" = xyes ; then \    echo "WARNING: Compiler failure! Trying without optimization!" >&2;\ -  echo "$(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $< -o $@" >&2 ;\ +     echo "$(CC) $(PREFLAGS) $(CFLAGS) -c $< -o $@" >$@.fail ;\ -  NO_ULIMIT=yes; \ -  export NO_ULIMIT; \ -  if $(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $< -o $@ ; then : ; else \ -  exit $$?; \ +  if NO_ULIMIT=yes $(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $< -o $@ ; then : ; else \ +  status=$$?; \ +  echo "Compilation command was:" >&2;\ +  echo "$(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $< -o $@" >&2 ;\ +  exit $$status; \    fi; \ -  +  else \ +  echo "Compilation command was:" >&2;\ +  echo "$(CC) $(PREFLAGS) $(CFLAGS) -c $< -o $@" >&2 ;\ +  exit $$status; \ +  fi; \    fi      #