[oe-commits] Holger Hans Peter Freyther : [site-conf] Add the tests for the squeak vm

GIT User account git at amethyst.openembedded.net
Wed Oct 15 18:11:49 UTC 2008


Module: openembedded.dev.git
Branch: holger/hash-style
Commit: b6c5a08721fab3e095377fa30e4eefceb078618c
URL:    http://gitweb.openembedded.net/?p=openembedded.dev.git&a=commit;h=b6c5a08721fab3e095377fa30e4eefceb078618c

Author: Holger Hans Peter Freyther <zecke at openmoko.org>
Date:   Thu Oct  2 10:53:28 2008 +0200

[site-conf] Add the tests for the squeak vm

---

 contrib/site-conf/aclocal.m4   |    1 +
 contrib/site-conf/configure.ac |    4 ++++
 contrib/site-conf/m4/squeak.m4 |   15 +++++++++++++++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/contrib/site-conf/aclocal.m4 b/contrib/site-conf/aclocal.m4
index 65b9fa3..277c895 100644
--- a/contrib/site-conf/aclocal.m4
+++ b/contrib/site-conf/aclocal.m4
@@ -53,3 +53,4 @@ m4_include([m4/ssh.m4])
 m4_include([m4/startupnotification.m4])
 m4_include([m4/sudo.m4])
 m4_include([m4/xffm.m4])
+m4_include([m4/squeak.m4])
diff --git a/contrib/site-conf/configure.ac b/contrib/site-conf/configure.ac
index bd5ce4d..fb342b0 100644
--- a/contrib/site-conf/configure.ac
+++ b/contrib/site-conf/configure.ac
@@ -8,4 +8,8 @@ AC_GNU_SOURCE
 OE_CHECK_BUILTIN
 OE_CHECK_GNU
 
+AC_C_DOUBLE_ALIGNMENT
+AC_C_DOUBLE_ORDER
+
+
 AC_OUTPUT([])
diff --git a/contrib/site-conf/m4/squeak.m4 b/contrib/site-conf/m4/squeak.m4
new file mode 100644
index 0000000..9d16f46
--- /dev/null
+++ b/contrib/site-conf/m4/squeak.m4
@@ -0,0 +1,15 @@
+# Tests from squeak
+AC_DEFUN([AC_C_DOUBLE_ALIGNMENT],
+[AC_CACHE_CHECK([whether unaligned access to doubles is ok], ac_cv_double_align,
+  AC_TRY_RUN([f(int i){*(double *)i=*(double *)(i+4);}
+              int main(){char b[[12]];f(b);return 0;}],
+    ac_cv_double_align="yes", ac_cv_double_align="no"))
+test "$ac_cv_double_align" = "no" && AC_DEFINE(DOUBLE_WORD_ALIGNMENT)])
+
+AC_DEFUN([AC_C_DOUBLE_ORDER],
+[AC_CACHE_CHECK([whether doubles are stored in Squeak order], ac_cv_double_order,
+  AC_TRY_RUN([union { double d; int i[[2]]; } d;
+              int main(void) { d.d= 1.0;  return d.i[[0]] == 0; }],
+    ac_cv_double_order="yes", ac_cv_double_order="no"))
+test "$ac_cv_double_order" = "no" && AC_DEFINE(DOUBLE_WORD_ORDER)])
+





More information about the Openembedded-commits mailing list