$NetBSD: patch-aa,v 1.2 2001/05/27 15:17:37 dmcmahill Exp $ work around a compiler bug (shocked i know) when building the m68k cross assembler on alpha. Without optimization gas gives the same results as on a real m68k box (NetBSD/mac68k). With optimization, gas crashes. --- gas/Makefile.in.orig Fri May 18 18:00:52 2001 +++ gas/Makefile.in Fri May 18 22:18:04 2001 @@ -88,5 +88,5 @@ tooldir = $(exec_prefix)/$(target_alias) -YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi` +YACC = @YACC@ LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi` @@ -1220,5 +1220,15 @@ LEXLIB = @LEXLIB@ YLWRAP = $(top_srcdir)/../ylwrap -CFLAGS = @CFLAGS@ +ALLCFLAGS = @CFLAGS@ +ifeq (${MACHINE_ARCH},alpha) +ifeq (${TARG_CPU},m68k) +CFLAGS=${ALLCFLAGS:-O%=} +else +CFLAGS=${ALLCFLAGS} +endif +else +CFLAGS=${ALLCFLAGS} +endif + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)