Commit b7130bfd authored by thoughtpolice's avatar thoughtpolice

Add support for iOS simulator (issue #8152).

The iOS simulator is essentially an iOS target but for an x86 machine
instead. It doesn't support the native code generator either, though.
Authored-by: default avatarStephen Blackheath <...@blacksapphire.com>
Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
parent 6a02f280
......@@ -25,7 +25,7 @@ AC_DEFUN([GHC_SELECT_FILE_EXTENSIONS],
x86_64-apple-darwin)
$3='.dylib'
;;
arm-apple-darwin10)
arm-apple-darwin10|i386-apple-darwin11)
$2='.a'
$3='.dylib'
;;
......@@ -1918,7 +1918,7 @@ AC_DEFUN([GHC_CONVERT_VENDOR],[
# converts os from gnu to ghc naming, and assigns the result to $target_var
AC_DEFUN([GHC_CONVERT_OS],[
case "$1-$2" in
darwin10-arm)
darwin10-arm|darwin11-i386)
$3="ios"
;;
*)
......
......@@ -61,6 +61,9 @@ moduleLayout = sdocWithPlatform $ \platform ->
Platform { platformArch = ArchARM {}, platformOS = OSiOS } ->
text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32\""
$+$ text "target triple = \"arm-apple-darwin10\""
Platform { platformArch = ArchX86, platformOS = OSiOS } ->
text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32\""
$+$ text "target triple = \"i386-apple-darwin11\""
_ ->
-- FIX: Other targets
empty
......
......@@ -161,9 +161,9 @@ GhcUnregisterised=@Unregisterised@
#
# Target platforms supported:
# i386, powerpc
# AIX is not supported
# IOS and AIX are not supported
ArchSupportsNCG=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc sparc)))
OsSupportsNCG=$(strip $(patsubst $(TargetOS_CPP), YES, $(patsubst aix,,$(TargetOS_CPP))))
OsSupportsNCG=$(strip $(patsubst $(TargetOS_CPP), YES, $(patsubst ios,,$(patsubst aix,,$(TargetOS_CPP)))))
GhcWithNativeCodeGen := $(strip\
$(if $(filter YESYESNO,\
......
......@@ -116,7 +116,7 @@ StgWord8 *win32AllocStack(void)
#ifdef i386_HOST_ARCH
#ifdef darwin_HOST_OS
#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
#define STG_GLOBAL ".globl "
#define STG_HIDDEN ".private_extern "
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment