summaryrefslogtreecommitdiff
path: root/cad/verilog-current/patches/patch-ad
blob: f6c2be77b903d19e00d7d1181d777d75f96fa242 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-ad,v 1.13 2006/08/11 13:28:08 dmcmahill Exp $

--- Makefile.in.orig	2006-05-01 20:47:29.000000000 +0000
+++ Makefile.in	2006-08-10 18:21:19.000000000 +0000
@@ -160,5 +160,15 @@
 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.cc parse.h: $(srcdir)/parse.y