pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/gauche Make lang/gauceh work on arm baed NetBSD.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7ed753011686
branches:  trunk
changeset: 567939:7ed753011686
user:      enami <enami%pkgsrc.org@localhost>
date:      Sun Nov 29 13:01:06 2009 +0000

description:
Make lang/gauceh work on arm baed NetBSD.

- Don't define DOUBLE_ARMENDIAN if netbsd.
- Backport alignment problem fix from trunk.

diffstat:

 lang/gauche/distinfo         |   5 ++-
 lang/gauche/patches/patch-aa |  18 ++++++++++---
 lang/gauche/patches/patch-ah |  58 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 75 insertions(+), 6 deletions(-)

diffs (104 lines):

diff -r 65e2e84f5080 -r 7ed753011686 lang/gauche/distinfo
--- a/lang/gauche/distinfo      Sun Nov 29 12:28:28 2009 +0000
+++ b/lang/gauche/distinfo      Sun Nov 29 13:01:06 2009 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.24 2009/11/27 09:26:06 enami Exp $
+$NetBSD: distinfo,v 1.25 2009/11/29 13:01:06 enami Exp $
 
 SHA1 (Gauche-0.9.tgz) = ebc18917c36201d6c3fda29dfdc52fce2d856a5f
 RMD160 (Gauche-0.9.tgz) = 3e0dfc1d498849b0d647e13f49addd0a56cc56fe
 Size (Gauche-0.9.tgz) = 3938498 bytes
-SHA1 (patch-aa) = 5ba93d6c1310ee9fd86e6d2f7edf6ef832bf7a5c
+SHA1 (patch-aa) = fc85a438f3c4e032001a3b875d575a455f91a3ac
 SHA1 (patch-ab) = 342ac7055e3e35a1f59c470376cfb7c21b05053d
 SHA1 (patch-af) = 0741e1a047ee7935bffa215a69cc417ba67b81f2
 SHA1 (patch-ag) = ee9946e364d6723b0efe3b260fc5d02ccb04621d
+SHA1 (patch-ah) = db08d8363368331e006b45d88ef0f05e150adc86
diff -r 65e2e84f5080 -r 7ed753011686 lang/gauche/patches/patch-aa
--- a/lang/gauche/patches/patch-aa      Sun Nov 29 12:28:28 2009 +0000
+++ b/lang/gauche/patches/patch-aa      Sun Nov 29 13:01:06 2009 +0000
@@ -1,8 +1,18 @@
-$NetBSD: patch-aa,v 1.9 2008/02/25 23:14:19 tnn Exp $
+$NetBSD: patch-aa,v 1.10 2009/11/29 13:01:06 enami Exp $
 
---- configure.orig     2008-02-13 16:32:18.000000000 +0100
-+++ configure
-@@ -9322,7 +9322,7 @@ fi
+--- configure.orig     2009-11-22 08:32:29.000000000 +0000
++++ configure  2009-11-29 09:13:36.000000000 +0000
+@@ -5459,6 +5459,9 @@
+  ;;
+   alpha*)
+     CFLAGS="$CFLAGS -mieee" ;;
++  arm*-*-netbsd*)
++    # Don't define DOUBLE_ARMENDIAN on netbsd.
++    ;;
+   arm*)
+     # ARM processor uses a special mixed endian for doubles.
+     cat >>confdefs.h <<\_ACEOF
+@@ -9402,7 +9405,7 @@
  
  
  
diff -r 65e2e84f5080 -r 7ed753011686 lang/gauche/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gauche/patches/patch-ah      Sun Nov 29 13:01:06 2009 +0000
@@ -0,0 +1,58 @@
+$NetBSD: patch-ah,v 1.7 2009/11/29 13:01:06 enami Exp $
+
+Index: src/gauche.h
+===================================================================
+--- src/gauche.h       (revision 6883)
++++ src/gauche.h       (revision 6885)
+@@ -134,6 +134,16 @@
+    Hence this macro. */
+ #define SCM_IGNORE_RESULT(expr)  do { if(expr) {} } while(0)
+ 
++/* ScmFlonum and ScmClass must always be aligned in 8-byte boundaries.
++   (All other Scheme objects can be in 4-byte boundary.)
++   Some platform doesn't align static double in 8-byte boundaries, so
++   we try this as well.  */
++#ifdef __GNUC__
++#define SCM_ALIGN8  __attribute__ ((aligned (8)))
++#else  /* !__GNUC__ */
++#define SCM_ALIGN8  /*empty*/
++#endif /* !__GNUC__ */
++
+ /*-------------------------------------------------------------
+  * BASIC TYPES
+  */
+@@ -289,7 +299,7 @@
+ 
+ typedef struct ScmFlonumRec {
+     double val;
+-} ScmFlonum;
++} ScmFlonum SCM_ALIGN8;
+ 
+ #define SCM_FLONUM(obj)            ((ScmFlonum*)(SCM_WORD(obj)&~0x07))
+ #define SCM_FLONUMP(obj)           (SCM_TAG2(obj) == 2)
+@@ -599,13 +609,9 @@
+    those fields casually.  Also, the order of these fields must be
+    reflected to the class definition macros below. */
+ struct ScmClassRec {
+-    /* We need all class structures be aligned on (at least) 8-byte boundary
+-       to make our tagging scheme work.  Dynamically allocated objects
+-       are *always* 8-byte aligned due to Boehm GC's architecture.  However,
+-       we found that statically allocated class structures can be placed
+-       4-byte boundary on some 32bit systems if we started ScmClassRec
+-       with SCM_INSTANCE_HEADER.  The following union is the trick
+-       to ensure 8-byte alighment on such systems. */ 
++    /* A trick to align statically allocated class structure on 8-byte
++       boundary.  This doesn't guarantee, though, so we use __alignment__
++       attribute as well, whenever possible (see SCM_ALIGN8 macro). */
+     union {
+         SCM_INSTANCE_HEADER;
+         double align_dummy;
+@@ -642,7 +648,7 @@
+     ScmInternalMutex mutex;     /* to protect from MT hazard */
+     ScmInternalCond cv;         /* wait on this while a class being updated */
+     void   *data;               /* extra data to do nasty trick */
+-};
++} SCM_ALIGN8;
+ 
+ typedef struct ScmClassStaticSlotSpecRec ScmClassStaticSlotSpec;
+ 



Home | Main Index | Thread Index | Old Index