Work around gcc codegen bug that results in infinite loop compiling mhz.c -O

on arm32
This commit is contained in:
abs 2000-11-08 10:13:40 +00:00
parent b4ce2f0971
commit d265c2aa67
3 changed files with 21 additions and 5 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2000/03/16 12:16:53 wiz Exp $
# $NetBSD: Makefile,v 1.9 2000/11/08 10:13:40 abs Exp $
DISTNAME= lmbench-2alpha11
PKGNAME= lmbench-2.11a
@ -12,6 +12,7 @@ HOMEPAGE= http://www.bitmover.com/lm/lmbench/
ALL_TARGET= build
USE_GMAKE= yes
USE_PERL5= yes
MAKE_ENV+= MACHINE_ARCH=$(MACHINE_ARCH)
post-configure:
@cd ${WRKSRC}; \

View file

@ -1,6 +1,6 @@
$NetBSD: patch-sum,v 1.4 1999/11/22 15:08:01 rh Exp $
$NetBSD: patch-sum,v 1.5 2000/11/08 10:13:41 abs Exp $
MD5 (patch-aa) = 7598b4509ca3435a0d3a1d15ba8b31d3
MD5 (patch-aa) = 545032c9d3e7fbdf870cde2c076d90ee
MD5 (patch-ab) = 692496a9eeb91566b091546f1432f193
MD5 (patch-ac) = d7d57bb3601d93f49a968d1f3faed2d6
MD5 (patch-ad) = 6802cdfb8f782d7af9ad27fd87ce6699

View file

@ -1,6 +1,7 @@
$NetBSD: patch-aa,v 1.1 1998/08/30 17:46:26 garbled Exp $
$NetBSD: patch-aa,v 1.2 2000/11/08 10:13:41 abs Exp $
--- src/Makefile.orig Fri Jul 31 12:55:18 1998
+++ src/Makefile Sun Aug 30 06:32:41 1998
+++ src/Makefile
@@ -30,7 +30,7 @@
O= ../bin/unknown
D= ../doc
@ -19,3 +20,17 @@ $NetBSD: patch-aa,v 1.1 1998/08/30 17:46:26 garbled Exp $
Wall:
@if [ ! -d $(BINDIR) ]; then mkdir -p $(BINDIR); fi
@@ -181,8 +181,13 @@
$O/flushdisk: flushdisk.c
$(COMPILE) -DMAIN -o $O/flushdisk flushdisk.c
+# Work around gcc codegen bug that results in infinite loop compiling mhz.c -O
$O/mhz: mhz.c timing.h stats.h bench.h $O/lmbench.a
+ifeq ($(MACHINE_ARCH),arm32)
+ $(CC) $(SYS5) $(CF) $(CPPFLAGS) $(LDFLAGS) -o $O/mhz mhz.c $O/lmbench.a $(LDLIBS) -lm
+else
$(COMPILE) -o $O/mhz mhz.c $O/lmbench.a $(LDLIBS) -lm
+endif
$O/lat_ctx: lat_ctx.c timing.h stats.h bench.h $O/lmbench.a
$(COMPILE) -o $O/lat_ctx lat_ctx.c $O/lmbench.a $(LDLIBS)