pkgsrc/math/tochnog/patches/patch-aa
kristerw 1dda53a009 Correct a bug in the patch that made the makefile think that c++
files has .gcc as suffix instead of .cc.
2004-03-08 00:10:52 +00:00

44 lines
1.3 KiB
Text

$NetBSD: patch-aa,v 1.4 2004/03/08 00:10:52 kristerw 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
@@ -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