pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/db4 Pre-3.3 GCC has an optimization bug on p...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a62253ba1a97
branches:  trunk
changeset: 470986:a62253ba1a97
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sun Mar 14 19:32:40 2004 +0000

description:
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.

diffstat:

 databases/db4/Makefile |  24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 2b2ee22f4a20 -r a62253ba1a97 databases/db4/Makefile
--- a/databases/db4/Makefile    Sun Mar 14 19:26:37 2004 +0000
+++ b/databases/db4/Makefile    Sun Mar 14 19:32:40 2004 +0000
@@ -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 @@
 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"



Home | Main Index | Thread Index | Old Index