In .:
authorGeoff Norton <grompf@sublimeintervention.com>
Wed, 12 Mar 2008 17:14:41 +0000 (17:14 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Wed, 12 Mar 2008 17:14:41 +0000 (17:14 -0000)
2008-03-12  Geoff Norton  <gnorton@novell.com>

* build-iphone.sh: A autogen/make wrapper to define everything to build
mono for the iphone.
* configure.in: Add support for arm-apple-darwin (iPhone).

svn path=/trunk/mono/; revision=98068

ChangeLog
build-iphone.sh [new file with mode: 0755]
configure.in

index 083ba55a87c6329a85befd5d6e92b70aa352c79f..d2362d517d0d4e20e53c9543e9ecb76ecc269e85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-12  Geoff Norton  <gnorton@novell.com>
+
+       * build-iphone.sh: A autogen/make wrapper to define everything to build
+       mono for the iphone.
+       * configure.in: Add support for arm-apple-darwin (iPhone).
+
 2008-03-05  Wade Berrier  <wberrier@novell.com>
 
        * scripts/Makefile.am: fix typo so that 'scripts_defaults' scripts get
diff --git a/build-iphone.sh b/build-iphone.sh
new file mode 100755 (executable)
index 0000000..db01b7e
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+ASPEN_ROOT=/Developer/Platforms/Aspen.platform/Developer
+ASPEN_SDK=$ASPEN_ROOT/SDKs/Aspen1.2.sdk/
+
+export PATH=$ASPEN_ROOT/usr/bin:$PATH
+
+export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
+export CC=arm-apple-darwin9-gcc-4.0.1
+export CXX=arm-apple-darwin9-g++-4.0.1
+export CPP="cpp-4.0 -nostdinc -U__i386__ -D__arm__"
+export CXXPP="cpp-4.0 -nostdinc -U__i386__ -D__arm__"
+export LD=$CC
+export LDFLAGS=-Wl,-syslibroot,$ASPEN_SDK
+
+export mono_cv_uscore=yes
+export cv_mono_sizeof_sunpath=104
+export ac_cv_func_posix_getpwuid_r=yes
+export ac_cv_func_backtrace_symbols=no
+
+pushd eglib 
+./autogen.sh --host=arm-apple-darwin9
+popd
+
+./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded --with-gc=none $@
+
+curl -o mono/mini/inssel.c http://primates.ximian.com/~gnorton/iphone/inssel.c
+curl -o mono/mini/inssel.h http://primates.ximian.com/~gnorton/iphone/inssel.h
+
+make
+
+# We dont use monoburg since I nicely provided the inssel's pregenerated above.
+pushd mono/monoburg
+$CC -o monoburg ./monoburg.c parser.c -I../../eglib/src -I../../eglib/src -I. -I../..  -Wl,-syslibroot,/Developer/Platforms/Aspen.platform/Developer/SDKs/Aspen1.2.sdk/ -pthread -L../../eglib/src/.libs -leglib -lm
+touch sample.c
+popd
+
+make
index f2a44ee61fa7a55e03d447a4ed4c8f4485cf4c84..b7f322ac902f09ededddfbb3b0b89e32c95a010c 100644 (file)
@@ -232,6 +232,9 @@ case "$host" in
                no_version_script=yes
                libdl=
                libgc_threads=pthreads
+               if test "x$cross_compiling" = "xyes"; then
+                       has_broken_apple_cpp=yes
+               fi
                ;;
        *)
                AC_MSG_WARN([*** Please add $host to configure.in checks!])
@@ -1300,11 +1303,13 @@ if test x$platform_win32 = xno; then
        dnl *** Checks for math functions ***
        dnl *********************************
         LIBS="$LIBS -lm";
-        AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
-                AC_TRY_LINK([#include <math.h>], 
-                [ finite(0.0); ], 
-                AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
-                AC_MSG_RESULT(no)))
+       if text "x$has_broken_apple_cpp" != "xyes"; then
+               AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
+                       AC_TRY_LINK([#include <math.h>], 
+                       [ finite(0.0); ], 
+                       AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
+                       AC_MSG_RESULT(no)))
+       fi
         AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
                 AC_TRY_LINK([#include <math.h>], 
                 [ isfinite(0.0); ], 
@@ -1779,6 +1784,14 @@ case "$host" in
                JIT_SUPPORTED=yes
                jit_wanted=true
                ;;
+       arm*-darwin*)
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               CPPFLAGS="$CPPFLAGS -DARM_FPU_NONE=1"
+               jit_wanted=true
+               ;;
        arm*-linux*)
                TARGET=ARM;
                arch_target=arm;
@@ -1949,7 +1962,7 @@ if test "x$with_tls" = "x__thread"; then
        ])
 fi
 
-if test ${TARGET} = ARM; then
+if test ${TARGET} = ARM && test x$cross_compiling = xno && test x$enable_mcs_build != xno; then
        dnl ******************************************
        dnl *** Check to see what FPU is available ***
        dnl ******************************************