提交 fd86e486 编写于 作者: L Levi Bard

Merge branch 'Mono2.6.x-Unity3.x' of github.com:Unity-Technologies/mono into Mono2.6.x-Unity3.x

#!/bin/sh
SDK_VERSION=4.2
ASPEN_ROOT=/Developer/Platforms/iPhoneOS.platform/Developer
ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS4.2.sdk/
SIMULATOR_ASPEN_ROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer
ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS${SDK_VERSION}.sdk/
SIMULATOR_ASPEN_SDK=$SIMULATOR_ASPEN_ROOT/SDKs/iPhoneSimulator${SDK_VERSION}.sdk
ORIG_PATH=$PATH
PRFX=$PWD/tmp
......@@ -110,10 +113,15 @@ build_iphone_crosscompiler ()
build_iphone_simulator ()
{
echo "Building iPhone simulator static lib";
export MACSYSROOT="-isysroot $SIMULATOR_ASPEN_SDK"
export MACSDKOPTIONS="-miphoneos-version-min=3.0 $MACSYSROOT"
export CC="$SIMULATOR_ASPEN_ROOT/usr/bin/gcc-4.2"
export CXX="$SIMULATOR_ASPEN_ROOT/usr/bin/g++-4.2"
perl build_runtime_osx.pl -iphone_simulator=1 || exit 1
echo "Copying iPhone simulator static lib to final destination";
mkdir -p builds/embedruntimes/iphone
cp mono/mini/.libs/libmono.a builds/embedruntimes/iphone/libmono-i386.a
unsetenv
}
usage()
......
......@@ -70,8 +70,14 @@ if (not $skipbuild)
#we need to manually set the compiler to gcc4, because the 10.4 sdk only shipped with the gcc4 headers
#their setup is a bit broken as they dont autodetect this, but basically the gist is if you want to copmile
#against the 10.4 sdk, you better use gcc4, otherwise things go boink.
$ENV{CC} = "gcc-4.0";
$ENV{CXX} = "gcc-4.0";
unless ($ENV{CC})
{
$ENV{CC} = "gcc-4.0";
}
unless ($ENV{CXX})
{
$ENV{CXX} = "gcc-4.0";
}
if ($debug)
{
......@@ -86,8 +92,6 @@ if (not $skipbuild)
$ENV{CFLAGS} = "-DTARGET_IPHONE_SIMULATOR -g -O0";
$macversion = "10.5";
$sdkversion = "10.5";
$ENV{CC} = "gcc-4.2";
$ENV{CXX} = "gcc-4.2";
}
#this will fail on a fresh working copy, so don't die on it.
......@@ -108,7 +112,10 @@ if (not $skipbuild)
unshift(@autogenparams, "--cache-file=osx.cache");
unshift(@autogenparams, "--disable-mcs-build");
unshift(@autogenparams, "--with-glib=embedded");
unshift(@autogenparams, "--with-macversion=$macversion");
if (!$iphone_simulator)
{
unshift(@autogenparams, "--with-macversion=$macversion");
}
unshift(@autogenparams, "--disable-nls"); #this removes the dependency on gettext package
# From Massi: I was getting failures in install_name_tool about space
......
......@@ -66,6 +66,7 @@ AC_ARG_WITH([macversion],
[ --with-macversion=<version> Choose minimum macos version],
[], [with_macversion=10.4])
if test -z MACSDKOPTIONS; then
MACSYSROOTBASE="-isysroot /Developer/SDKs"
if [[ "$with_macversion" == "10.4" ]]; then
MACSYSROOT="$MACSYSROOTBASE/MacOSX10.4u.sdk"
......@@ -73,7 +74,7 @@ else
MACSYSROOT="$MACSYSROOTBASE/MacOSX""$with_macversion"".sdk"
fi
MACSDKOPTIONS="-mmacosx-version-min=$with_macversion $MACSYSROOT"
fi
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
......
......@@ -112,7 +112,7 @@ void GC_push_all_stacks() {
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
#if defined(I386)
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) || defined(TARGET_IPHONE_SIMULATOR)
lo = state.__esp;
......
......@@ -2666,7 +2666,7 @@ namespace System.Net.Sockets
#if NET_2_0
if (System.Environment.SocketSecurityEnabled)
{
Console.WriteLine ("Checking {0}", sockaddr);
//Console.WriteLine ("Checking {0}", sockaddr);
if (!CheckEndPoint(sockaddr))
{
buf.Initialize ();
......
......@@ -31,17 +31,10 @@ mono_file_map_open (const char* name)
guint64
mono_file_map_size (MonoFileMap *fmap)
{
#ifdef TARGET_IPHONE_SIMULATOR
struct stat64 stat_buf;
if (fstat64 (fileno ((FILE*)fmap), &stat_buf) < 0)
return 0;
return stat_buf.st_size;
#else
struct stat stat_buf;
if (fstat (fileno ((FILE*)fmap), &stat_buf) < 0)
return 0;
return stat_buf.st_size;
#endif
}
int
......
......@@ -23,7 +23,7 @@
#define UCONTEXT_REG_EDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_edi)
#define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_eip)
#elif defined(__APPLE__)
# if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
# if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) || defined(TARGET_IPHONE_SIMULATOR)
#define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__eax)
#define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__ebx)
#define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__ecx)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册