From 8d9ee4af3582aa67a6ff782881ad48cc8b213f43 Mon Sep 17 00:00:00 2001 From: kristerw Date: Sat, 27 Sep 2003 18:33:56 +0000 Subject: It is not safe to do unaligned access in ISO C, even if the configure script manages to do this without receiving a SIGBUS... Make the test always return that unalign access is forbidden. This makes the package work on ARM. PKGREVISION++ --- lang/moscow_ml/Makefile | 3 ++- lang/moscow_ml/distinfo | 3 ++- lang/moscow_ml/patches/patch-ae | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 lang/moscow_ml/patches/patch-ae diff --git a/lang/moscow_ml/Makefile b/lang/moscow_ml/Makefile index ee0741629fd..d669e8ee511 100644 --- a/lang/moscow_ml/Makefile +++ b/lang/moscow_ml/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.19 2003/07/17 21:44:56 grant Exp $ +# $NetBSD: Makefile,v 1.20 2003/09/27 18:33:56 kristerw Exp $ DISTNAME= mos20src PKGNAME= moscow_ml-2.00 +PKGREVISION= 1 WRKSRC= ${WRKDIR}/mosml/src CATEGORIES= lang MASTER_SITES= ftp://ftp.dina.kvl.dk/pub/mosml/ \ diff --git a/lang/moscow_ml/distinfo b/lang/moscow_ml/distinfo index ba4129b63af..4cce70e95dc 100644 --- a/lang/moscow_ml/distinfo +++ b/lang/moscow_ml/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2001/04/19 15:00:54 agc Exp $ +$NetBSD: distinfo,v 1.3 2003/09/27 18:33:56 kristerw Exp $ SHA1 (mos20src.tar.gz) = 5ca90c0dc679ebb6d84cb28b5cca7d4c7a8edfbc Size (mos20src.tar.gz) = 2308637 bytes @@ -6,3 +6,4 @@ SHA1 (patch-aa) = ffe745a14f8b41d2c1c278fbd6f7057a856a1e47 SHA1 (patch-ab) = 37645c33f1f1f5c2ead0183f6adb0d1ded6c90e3 SHA1 (patch-ac) = b7b8fa6cc0d047f769874a3e2afd75364545dc34 SHA1 (patch-ad) = dd2900330220b4e8226b1bf4cf9d15c8e2f8e24f +SHA1 (patch-ae) = 2e2875d9997233e6696833f92d7ae77c4930499d diff --git a/lang/moscow_ml/patches/patch-ae b/lang/moscow_ml/patches/patch-ae new file mode 100644 index 00000000000..8d0b9f433ff --- /dev/null +++ b/lang/moscow_ml/patches/patch-ae @@ -0,0 +1,18 @@ +$NetBSD: patch-ae,v 1.5 2003/09/27 18:33:56 kristerw Exp $ +--- config/auto-aux/align.c.orig Sat Sep 27 19:00:30 2003 ++++ config/auto-aux/align.c Sat Sep 27 19:53:24 2003 +@@ -98,6 +98,14 @@ + long n[1001]; + int speed_aligned, speed_unaligned; + ++#if 1 ++ /* ISO C is very restrictive about unaligned access, and absence of ++ * SIGBUS or SIGSEGV for these tests does not mean that the compiler ++ * will generate the expected code... So report that unaligned acces ++ * does not work. */ ++ exit(1); ++#endif ++ + if (test(access16, (char *) n + 1)) exit(1); + if (test(access32, (char *) n + 1)) exit(1); + if (test(access32, (char *) n + 2)) exit(1); -- cgit v1.2.3