From 3096bf46a7b1665a58735a3158c092986ab5f670 Mon Sep 17 00:00:00 2001 From: jlam Date: Sun, 14 Mar 2004 19:32:40 +0000 Subject: 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. --- databases/db4/Makefile | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'databases') 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" -- cgit v1.2.3