summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-14 19:32:40 +0000
committerjlam <jlam@pkgsrc.org>2004-03-14 19:32:40 +0000
commit57d1d7c0279628b5f8fe26ea7a166b40ae384011 (patch)
treed1e7e66919e4c9e2329808fb23c98f43659723c4 /databases
parent2ec850d8925ee8d72de9acab04c5338cd5ae8eb4 (diff)
downloadpkgsrc-57d1d7c0279628b5f8fe26ea7a166b40ae384011.tar.gz
Pre-3.3 GCC has an optimization bug on powerpc that's tickled by the db4
source code, so remove optimization flags in that case. This fixes PR 23737 by John Klos.
Diffstat (limited to 'databases')
-rw-r--r--databases/db4/Makefile24
1 files changed, 23 insertions, 1 deletions
diff --git a/databases/db4/Makefile b/databases/db4/Makefile
index 04e9fb2e390..b4b8c301479 100644
--- a/databases/db4/Makefile
+++ b/databases/db4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2004/03/12 21:35:58 jlam Exp $
+# $NetBSD: Makefile,v 1.15 2004/03/14 19:32:40 jlam Exp $
DISTNAME= db-4.2.52
PKGNAME= ${DISTNAME:S/db/db4/}
@@ -31,6 +31,28 @@ CONFIGURE_ARGS+= --program-transform-name=s,db_,db4_,
FC= ${FALSE}
F77= ${FALSE}
+.if ${MACHINE_ARCH} == "powerpc"
+. include "../../mk/compiler.mk"
+. if !empty(CC_VERSION:Mgcc*)
+. if !defined(_GCC_IS_TOO_OLD)
+_GCC_IS_TOO_OLD!= \
+ if ${PKG_ADMIN} pmatch 'gcc<3.3' ${CC_VERSION}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+MAKEFLAGS+= _GCC_IS_TOO_OLD=${_GCC_IS_TOO_OLD}
+. endif
+. if !empty(_GCC_IS_TOO_OLD:M[yY][eE][sS])
+#
+# Pre-3.3 GCC has an optimization bug tickled by the db4 code, so remove
+# optimization when
+#
+BUILDLINK_TRANSFORM+= S:-O[0-9]*:
+. endif
+. endif
+.endif
+
.if defined(WITH_JAVA) && (${WITH_JAVA} == "yes")
CONFIGURE_ARGS+= --enable-java
. include "../../mk/java-vm.mk"