summaryrefslogtreecommitdiff
path: root/math/tochnog/patches/patch-aa
blob: 5fa4505be4ac327d8c947e95c722f5fb3ceccf58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$NetBSD: patch-aa,v 1.3 2001/05/07 22:09:15 dmcmahill Exp $

avoid the c++ with optimization compiler bug on one particular file.

--- makefile.orig	Sun Apr  8 13:13:35 2001
+++ makefile	Mon May  7 17:50:13 2001
@@ -22,5 +22,5 @@
 
 #  ***********  default environment *******************
-SRC_CPP=cc
+SRC_CPP=$(CC)
 SRC_C=c
 SYS_FILE=sysother
@@ -66,5 +66,5 @@
 
 #  ***********  default platform  *******************
-default: linux_old
+default: netbsd
 
 # single and multi-processor windows; borland c++ compiler
@@ -232,4 +232,17 @@
 	"LINK_FLAGS_AFTER= $(PROFILE) $(ALL_LIB) -lstdcpp -lm -o tochnog"
 
+netbsd: 
+	make tochnog \
+	"SYS_FILE=sysother" \
+	"OBJ=o" \
+	"BCPP=" \
+	"VCPP=" \
+	"COMPILER_C=$(CC)" \
+	"COMPILER_CPP=$(CXX)" \
+	"COMPILER_FLAGS=$(CFLAGS) -ansi -c $(ALL_INCLUDE)" \
+	"LINK_FLAGS_BEFORE=" \
+	"LINK_FLAGS_AFTER= $(ALL_LIB) -lm -o tochnog" \
+	"MACHINE_ARCH=$(MACHINE_ARCH)"
+
 tochnog: adjust.$(OBJ) area.$(OBJ) \
 	beam.$(OBJ) bounda.$(OBJ) calcul.$(OBJ) \
@@ -324,6 +337,12 @@
 	$(COMPILER_CPP) $(COMPILER_FLAGS) $(BCPP) $(VCPP)date.$(SRC_CPP)
 
+COMPILER_FLAGS_NOOPT=${COMPILER_FLAGS:C/-O.*//}
+
 database.$(OBJ): database.$(SRC_CPP) tochnog.h
+.if ${MACHINE_ARCH} == "alpha"
+	$(COMPILER_CPP) $(COMPILER_FLAGS_NOOPT) $(BCPP) $(VCPP)database.$(SRC_CPP)
+.else
 	$(COMPILER_CPP) $(COMPILER_FLAGS) $(BCPP) $(VCPP)database.$(SRC_CPP)
+.endif
 
 delete.$(OBJ): delete.$(SRC_CPP) tochnog.h