pkgsrc/math/tochnog/patches/patch-aa
2001-05-07 22:09:14 +00:00

51 lines
1.4 KiB
Text

$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