summaryrefslogtreecommitdiff
path: root/cad/verilog/patches/patch-ad
blob: eabde9cbc2fb15dc73f6a3cb4937c7c98e00854a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ad,v 1.6 2001/08/04 01:20:44 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 Mar 25 00:59:46 2001
+++ Makefile.in	Wed May 16 09:38:37 2001
@@ -143,5 +143,14 @@
 lexor.o: lexor.cc parse.h
 
+# 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