From ef0d2422a43a9220517079d99c1f728cd5f6c47e Mon Sep 17 00:00:00 2001 From: Basile Desloges <basile.desloges@cea.fr> Date: Mon, 30 Nov 2020 17:25:10 +0100 Subject: [PATCH] [kernel] Update default machdep to x86_64 or FRAMAC_MACHDEP --- man/frama-c.1 | 4 +++- src/kernel_services/plugin_entry_points/kernel.ml | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/man/frama-c.1 b/man/frama-c.1 index f175412be20..cacfe5f99cb 100644 --- a/man/frama-c.1 +++ b/man/frama-c.1 @@ -395,7 +395,9 @@ uses \f[I]machine\f[R] as the current machine-dependent configuration (size of the various integer types, endiandness, \&...). The list of currently supported machines is available through option \f[I]-machdep help\f[R]. -Default is \f[B]x86_32\f[R]. +Default is \f[B]x86_64\f[R]. +The environment variable FRAMAC_MACHDEP can be used to override the default +value. The command line parameter still has priority over the default value. .TP .B -main \f[I]f\f[R] sets \f[I]f\f[R] as the entry point of the analysis. diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index 27e2b1cd3fe..ab0efd4a4eb 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -931,11 +931,15 @@ module Machdep = (struct let module_name = "Machdep" let option_name = "-machdep" - let default = "x86_32" + let default = + try Sys.getenv "FRAMAC_MACHDEP" + with Not_found -> "x86_64" let arg_name = "machine" let help = "use <machine> as the current machine dependent configuration. \ - See \"-machdep help\" for a list" + See \"-machdep help\" for a list. The environment variable \ + FRAMAC_MACHDEP can be used to override the default value. The command \ + line parameter still has priority over the default value" end) let () = Parameter_customize.set_group parsing -- GitLab