work around optimizer bug in gcc 2.95 on sparc64

This commit is contained in:
naddy 2003-08-22 23:07:48 +00:00
parent 89ca6154fb
commit 9690742be3
2 changed files with 26 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 2003/05/05 03:37:09 margarida Exp $
# $OpenBSD: Makefile,v 1.3 2003/08/22 23:07:48 naddy Exp $
COMMENT= "modular log analyzer"
@ -22,6 +22,11 @@ LIB_DEPENDS= expat.3::textproc/expat \
pcre::devel/pcre \
adns.1::net/adns
# work around optimizer bug in gcc 2.95
.if ${MACHINE_ARCH} == "sparc64"
PATCH_LIST= patch-* gcc-*
.endif
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/modlogan
CONFIGURE_ENV += LOCALBASE="${LOCALBASE}" \

View File

@ -0,0 +1,20 @@
$OpenBSD: gcc-configure,v 1.1 2003/08/22 23:07:48 naddy Exp $
--- configure.orig 2003-08-23 00:43:32.000000000 +0200
+++ configure 2003-08-23 00:45:16.000000000 +0200
@@ -10119,6 +10119,8 @@ exit (malloc (0) ? 0 : 1);
}
_ACEOF
rm -f conftest$ac_exeext
+_SAVE_CFLAGS=$CFLAGS
+CFLAGS=-O0
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
@@ -10138,6 +10140,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_malloc_0_nonnull=no
fi
+CFLAGS=$_SAVE_CFLAGS
rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi