$NetBSD: patch-ad,v 1.11 2003/02/04 00:46:08 dmcmahill Exp $ work around a c++ -O2 bug which is present on at least sparc and pmax using egcs-1.1.1 --- Makefile.in.orig Sun Jan 26 16:15:58 2003 +++ Makefile.in @@ -174,7 +174,17 @@ lexor.o: lexor.cc parse.h +# work around buggy compilers when compiling the parser with optimization +# make sure no one sneaks a -O* in on us via one of these variables +# set in the environment +CXX_NOOPT=$(CXX:-O%=) +CPPFLAGS_NOOPT=$(CPPFLAGS:-O%=) +CXXFLAGS_NOOPT=$(CXXFLAGS:-O%=) + parse.o: parse.cc + @[ -d dep ] || mkdir dep + $(CXX_NOOPT) $(CPPFLAGS_NOOPT) $(CXXFLAGS_NOOPT) -MD -c $< -o $*.o + mv $*.d dep/$*.d parse.h parse.cc: $(srcdir)/parse.y $(YACC) --verbose -t -p VL -d -o parse.cc $(srcdir)/parse.y