From c50680bb86564fe61db61e6140a418ccc7d36677 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 23 Dec 2020 15:54:51 +0100 Subject: AArch64: macOS port This commit adds support for macOS (and probably iOS) running on AArch64 / ARM 64-bit / "Apple silicon" processors. --- driver/Frontend.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/Frontend.ml b/driver/Frontend.ml index bb97e945..183908d3 100644 --- a/driver/Frontend.ml +++ b/driver/Frontend.ml @@ -117,7 +117,9 @@ let init () = | "riscV" -> if Configuration.model = "64" then Machine.rv64 else Machine.rv32 - | "aarch64" -> Machine.aarch64 + | "aarch64" -> if Configuration.abi = "apple" + then Machine.aarch64_apple + else Machine.aarch64 | _ -> assert false end; Env.set_builtins C2C.builtins; -- cgit From ab62e1bed37d2efe4d2a9e0139839bae21b1cdd9 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Mon, 18 Jan 2021 19:56:44 +0100 Subject: "macosx" is now called "macos" The configure script still accepts "macosx" for backward compatibility, but every other part of CompCert now uses "macos". --- driver/Configuration.ml | 2 +- driver/Frontend.ml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'driver') diff --git a/driver/Configuration.ml b/driver/Configuration.ml index 2188acf0..4b0c116e 100644 --- a/driver/Configuration.ml +++ b/driver/Configuration.ml @@ -157,4 +157,4 @@ let response_file_style = let gnu_toolchain = system <> "diab" -let elf_target = system <> "macosx" && system <> "cygwin" +let elf_target = system <> "macos" && system <> "cygwin" diff --git a/driver/Frontend.ml b/driver/Frontend.ml index 183908d3..6590e793 100644 --- a/driver/Frontend.ml +++ b/driver/Frontend.ml @@ -109,8 +109,8 @@ let init () = | "x86" -> if Configuration.model = "64" then Machine.x86_64 else - if Configuration.abi = "macosx" - then Machine.x86_32_macosx + if Configuration.abi = "macos" + then Machine.x86_32_macos else if Configuration.system = "bsd" then Machine.x86_32_bsd else Machine.x86_32 -- cgit From 5a632954c85e8b2b5afea124e4fc83f39c5d3598 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 1 Jun 2021 14:37:07 +0200 Subject: [BROKEN] Merge with v3.9 : something broken for __builtin_expect in cfrontend/C2C.ml --- driver/CommonOptions.ml | 1 - 1 file changed, 1 deletion(-) (limited to 'driver') diff --git a/driver/CommonOptions.ml b/driver/CommonOptions.ml index e8a6941c..a816dd41 100644 --- a/driver/CommonOptions.ml +++ b/driver/CommonOptions.ml @@ -77,7 +77,6 @@ let general_help = -v Print external commands before invoking them -timings Show the time spent in various compiler passes -version Print the version string and exit - -version-file Print version inforation to and exit -target Generate code for the given target -conf Read configuration from file @ Read command line options from -- cgit From d41bc9d9eecb7febc7ad48cb7d3a35768b73ee54 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 1 Jun 2021 15:54:47 +0200 Subject: Add target ELF --- driver/Frontend.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'driver') diff --git a/driver/Frontend.ml b/driver/Frontend.ml index 0d0ff26c..480932df 100644 --- a/driver/Frontend.ml +++ b/driver/Frontend.ml @@ -119,6 +119,7 @@ let init () = else Machine.rv32 | "kvx" -> if Configuration.os = "cos" then Machine.kvxcos else if Configuration.os = "mbr" then Machine.kvxmbr + else if Configuration.os = "elf" then Machine.kvxelf else (Printf.eprintf "Configuration OS = %s\n" Configuration.os; failwith "Wrong OS configuration for KVX") | "aarch64" -> if Configuration.abi = "apple" -- cgit