From a37b1ba53e9254a632fcf0573f2e810a18add78c Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 16 Nov 2004 23:45:25 +0000 Subject: Migrate powerpc hack to hacks.mk to simplify core logic in Makefile. --- databases/db4/Makefile | 24 +----------------------- databases/db4/hacks.mk | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 databases/db4/hacks.mk (limited to 'databases') diff --git a/databases/db4/Makefile b/databases/db4/Makefile index da9113db5b7..f1099a07de4 100644 --- a/databases/db4/Makefile +++ b/databases/db4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2004/11/10 15:51:23 jlam Exp $ +# $NetBSD: Makefile,v 1.26 2004/11/16 23:45:25 jlam Exp $ DISTNAME= db-4.2.52 PKGNAME= ${DISTNAME:S/db/db4/} @@ -34,28 +34,6 @@ CONFIGURE_ARGS+= --program-transform-name=s,db_,db4_, # needed for this package the following does no harm on other platform. CONFIGURE_ENV+= 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. -# -BUILDLINK_TRANSFORM+= rm:-O[0-9]* -. endif -. endif -.endif - .if defined(WITH_JAVA) && (${WITH_JAVA} == "yes") CONFIGURE_ARGS+= --enable-java . include "../../mk/java-vm.mk" diff --git a/databases/db4/hacks.mk b/databases/db4/hacks.mk new file mode 100644 index 00000000000..4e2a9336cfb --- /dev/null +++ b/databases/db4/hacks.mk @@ -0,0 +1,29 @@ +# $NetBSD: hacks.mk,v 1.1 2004/11/16 23:45:25 jlam Exp $ + +### [Sun Mar 14 19:32:40 UTC 2004 : jlam] +### 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. +### +.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. +# +PKG_HACKS+= powerpc-codegen +BUILDLINK_TRANSFORM+= rm:-O[0-9]* +. endif +. endif +.endif -- cgit v1.2.3