aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2016-10-11 11:51:16 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2016-10-11 11:51:16 +0200
commite73d255ec045983787ed935ad02d31d45353a2b1 (patch)
tree7a935f55c4c037863e607802c8f557ad13e8ed0b /configure
parent3c605199ab0d096cd66ba671a4e23eac9e79bbc2 (diff)
downloadcompcert-e73d255ec045983787ed935ad02d31d45353a2b1.tar.gz
compcert-e73d255ec045983787ed935ad02d31d45353a2b1.zip
x86-64 MacOS X support
- Avoid absolute addressing for labels, use RIP-relative addressing - Different, RIP-relative implementation of jump tables
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index ccdf6c27..d803e695 100755
--- a/configure
+++ b/configure
@@ -340,6 +340,22 @@ if test "$arch" = "ia32" -a "$model" = "64"; then
struct_return="ref" # to check!
system="linux"
;;
+ macosx)
+ # kernel major versions count upwards from 4 for OSX 10.0 to 15 for OSX 10.11
+ kernel_major=`uname -r | cut -d "." -f 1`
+
+ abi="macosx"
+ casm="${toolprefix}gcc"
+ casm_options="-arch x86_64 -c"
+ cc="${toolprefix}gcc -arch x86_64"
+ clinker="${toolprefix}gcc"
+ cprepro="${toolprefix}gcc"
+ cprepro_options="-std=c99 -arch x86_64 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' -E"
+ libmath=""
+ struct_passing="ref-callee" # wrong!
+ struct_return="ref" # to check!
+ system="macosx"
+ ;;
*)
echo "Error: invalid eabi/system '$target' for architecture X86_64." 1>&2
echo "$usage" 1>&2