summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aclocal.m44
-rw-r--r--compiler/llvmGen/LlvmCodeGen/Ppr.hs17
-rw-r--r--rts/StgCRun.c4
3 files changed, 14 insertions, 11 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index cbf51df3cf..ce8944c04d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -25,7 +25,7 @@ AC_DEFUN([GHC_SELECT_FILE_EXTENSIONS],
x86_64-apple-darwin)
$3='.dylib'
;;
- arm-apple-darwin10|i386-apple-darwin11|aarch64-apple-darwin14)
+ arm-apple-darwin10|i386-apple-darwin11|aarch64-apple-darwin14|x86_64-apple-darwin14)
$2='.a'
$3='.dylib'
;;
@@ -1936,7 +1936,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|darwin11-i386|darwin14-aarch64)
+ darwin10-arm|darwin11-i386|darwin14-aarch64|darwin14-x86_64)
$3="ios"
;;
*)
diff --git a/compiler/llvmGen/LlvmCodeGen/Ppr.hs b/compiler/llvmGen/LlvmCodeGen/Ppr.hs
index 1de630ef10..37d1391519 100644
--- a/compiler/llvmGen/LlvmCodeGen/Ppr.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Ppr.hs
@@ -60,14 +60,17 @@ moduleLayout = sdocWithPlatform $ \platform ->
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-unknown-nto-qnx8.0.0eabi\""
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\""
+ text "target datalayout = \"e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32\""
+ $+$ text "target triple = \"thumbv7-apple-ios7.0.0\""
Platform { platformArch = ArchARM64, platformOS = OSiOS } ->
- text "target datalayout = \"e-p:64:64:64-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:128:128-a0:0:64-n32:64-S128\""
+ text "target datalayout = \"e-m:o-i64:64-i128:128-n32:64-S128\""
$+$ text "target triple = \"arm64-apple-ios7.0.0\""
+ Platform { platformArch = ArchX86, platformOS = OSiOS } ->
+ text "target datalayout = \"e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128\""
+ $+$ text "target triple = \"i386-apple-ios7.0.0\""
+ Platform { platformArch = ArchX86_64, platformOS = OSiOS } ->
+ text "target datalayout = \"e-m:o-i64:64-f80:128-n8:16:32:64-S128\""
+ $+$ text "target triple = \"x86_64-apple-ios7.0.0\""
Platform { platformArch = ArchARM64, platformOS = OSLinux } ->
text "target datalayout = \"e-m:e-i64:64-i128:128-n32:64-S128\""
$+$ text "target triple = \"aarch64-unknown-linux-gnu\""
@@ -78,7 +81,7 @@ moduleLayout = sdocWithPlatform $ \platform ->
-- If you see the above panic, GHC is missing the required target datalayout
-- and triple information. You can obtain this info by compiling a simple
-- 'hello world' C program with the clang C compiler eg:
- -- clang hello.c -emit-llvm -o hello.ll
+ -- clang -S hello.c -emit-llvm -o -
-- and the first two lines of hello.ll should provide the 'target datalayout'
-- and 'target triple' lines required.
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index cf0c05c395..c110f512b1 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -245,7 +245,7 @@ StgRunIsImplementedInAssembler(void)
#define STG_GLOBAL ".globl "
-#ifdef darwin_HOST_OS
+#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
#define STG_HIDDEN ".private_extern "
#else
#define STG_HIDDEN ".hidden "
@@ -417,7 +417,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
#define STG_GLOBAL ".globl "
-#ifdef darwin_HOST_OS
+#if defined(darwin_HOST_OS)
#define STG_HIDDEN ".private_extern "
#else
#define STG_HIDDEN ".hidden "