1 # $NetBSD: hacks.mk,v 1.4 2005/12/05 20:49:57 rillig Exp $
3 ### [Sun Mar 14 19:32:40 UTC 2004 : jlam]
4 ### GCC 3.3.x and older versions have an optimization bug on powerpc that's
5 ### tickled by the db4 source code, so remove optimization flags in that
6 ### case. This fixes PR pkg/30647 by Ian Spray.
8 .if ${MACHINE_ARCH} == "powerpc"
9 . include "../../mk/compiler.mk"
10 . if !empty(CC_VERSION:Mgcc*)
11 . if !defined(_GCC_IS_TOO_OLD)
13 if ${PKG_ADMIN} pmatch 'gcc<3.4' ${CC_VERSION}; then \
18 MAKEFLAGS+= _GCC_IS_TOO_OLD=${_GCC_IS_TOO_OLD:Q}
20 . if !empty(_GCC_IS_TOO_OLD:M[yY][eE][sS])
21 PKG_HACKS+= powerpc-codegen
22 BUILDLINK_TRANSFORM+= rm:-O[0-9]*