From 13bfd49d3d1f2d61cbe62b32c026a6a98c5ecda5 Mon Sep 17 00:00:00 2001
From: Andre Maroneze <andre.oliveiramaroneze@cea.fr>
Date: Fri, 5 Jun 2020 14:34:31 +0200
Subject: [PATCH] [Analysis-scripts] add mandatory MACHDEP to Makefile template

---
 share/analysis-scripts/frama-c.mk  | 3 ++-
 share/analysis-scripts/template.mk | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/share/analysis-scripts/frama-c.mk b/share/analysis-scripts/frama-c.mk
index b427e63aef0..32e09ef1365 100644
--- a/share/analysis-scripts/frama-c.mk
+++ b/share/analysis-scripts/frama-c.mk
@@ -31,6 +31,7 @@
 # FRAMAC        the frama-c binary
 # FRAMAC_GUI    the frama-c gui binary
 # CPPFLAGS      preprocessing flags
+# MACHDEP       machdep to use with frama-c
 # FCFLAGS       general flags to use with frama-c
 # FCGUIFLAGS    flags to use with frama-c-gui
 # EVAFLAGS      flags to use with the Eva plugin
@@ -161,7 +162,7 @@ SHELL        := /bin/bash
 	@#
 
 %.parse: SOURCES = $(filter-out %/command,$^)
-%.parse: PARSE = $(FRAMAC) $(FCFLAGS) -cpp-extra-args="$(CPPFLAGS)" $(SOURCES)
+%.parse: PARSE = $(FRAMAC) $(FCFLAGS) -machdep $(MACHDEP) -cpp-extra-args="$(CPPFLAGS)" $(SOURCES)
 %.parse: $$(if $$^,,.IMPOSSIBLE) $$(shell $(DIR)cmd-dep.sh $$@/command $$(PARSE))
 	@$(call display_command,$(PARSE))
 	mkdir -p $@
diff --git a/share/analysis-scripts/template.mk b/share/analysis-scripts/template.mk
index 268cfddb776..650d75de6a5 100644
--- a/share/analysis-scripts/template.mk
+++ b/share/analysis-scripts/template.mk
@@ -11,6 +11,8 @@ include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/eva-prefix.
 
 # Edit below as needed. Suggested flags are optional.
 
+MACHDEP = x86_32
+
 ## Preprocessing flags (for -cpp-extra-args)
 CPPFLAGS    +=
 
-- 
GitLab