summaryrefslogtreecommitdiff
path: root/databases/db4/hacks.mk
blob: 4e2a9336cfb494462aba49967d2c28938266cf11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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