update Fri Jan 22 12:37:00 PST 2010
[pkgsrc.git] / databases / db4 / hacks.mk
1 # $NetBSD: hacks.mk,v 1.4 2005/12/05 20:49:57 rillig Exp $
2
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.
7 ###
8 .if ${MACHINE_ARCH} == "powerpc"
9 .  include "../../mk/compiler.mk"
10 .  if !empty(CC_VERSION:Mgcc*)
11 .    if !defined(_GCC_IS_TOO_OLD)
12 _GCC_IS_TOO_OLD!=       \
13         if ${PKG_ADMIN} pmatch 'gcc<3.4' ${CC_VERSION}; then            \
14                 ${ECHO} "yes";                                          \
15         else                                                            \
16                 ${ECHO} "no";                                           \
17         fi
18 MAKEFLAGS+=     _GCC_IS_TOO_OLD=${_GCC_IS_TOO_OLD:Q}
19 .    endif
20 .    if !empty(_GCC_IS_TOO_OLD:M[yY][eE][sS])
21 PKG_HACKS+=             powerpc-codegen
22 BUILDLINK_TRANSFORM+=   rm:-O[0-9]*
23 .    endif
24 .  endif
25 .endif