Skip to content
Snippets Groups Projects
Commit cdbe7762 authored by Kostyantyn Vorobyov's avatar Kostyantyn Vorobyov
Browse files

Added machine-option for GCC to E-ACSL wrapper script

parent b838edf0
No related branches found
No related tags found
No related merge requests found
...@@ -52,9 +52,20 @@ SHORTOPTIONS="h,c,C,p,d:,o:,O:,v:,f,E:,R,L,M,l:,e:,g,q,s:,F:" ...@@ -52,9 +52,20 @@ SHORTOPTIONS="h,c,C,p,d:,o:,O:,v:,f,E:,R,L,M,l:,e:,g,q,s:,F:"
# Prefix for an error message due to wrong arguments # Prefix for an error message due to wrong arguments
ERROR="ERROR parsing arguments:" ERROR="ERROR parsing arguments:"
# Architecture-dependent flags. Since by default Frama-C uses 32-bit
# architecture we need to make sure that same architecture is used for
# instrumentation and for compilation.
MACHDEPFLAGS="`getconf LONG_BIT`"
# -machdep option sent to frama-c
MACHDEP="-machdep gcc_x86_$MACHDEPFLAGS"
# Macro for correct preprocessing of Frama-C generated code
CPPMACHDEP="-D__FC_MACHDEP_X86_$MACHDEPFLAGS"
# GCC machine option
GCCMACHDEP="-m$MACHDEPFLAGS"
# Gcc # Gcc
CC="`check_tool 'gcc'`" CC="`check_tool 'gcc'`"
CFLAGS="-std=c99 -g3 -O2 -pedantic -fno-builtin -Wall \ CFLAGS="-std=c99 $GCCMACHDEP -g3 -O2 -pedantic -fno-builtin -Wall \
-Wno-long-long \ -Wno-long-long \
-Wno-attributes \ -Wno-attributes \
-Wno-unused-result \ -Wno-unused-result \
...@@ -79,25 +90,6 @@ RTL="$EACSL_SHARE/e_acsl.c \ ...@@ -79,25 +90,6 @@ RTL="$EACSL_SHARE/e_acsl.c \
$EACSL_SHARE/memory_model/e_acsl_bittree.c \ $EACSL_SHARE/memory_model/e_acsl_bittree.c \
" "
# Frama-c machdep option
ARCH="$(uname -m | tr -d '\n')"
case $ARCH in
x86_64)
MACHDEPFLAGS="86_64"
;;
i686)
MACHDEPFLAGS="86_32"
;;
*)
error "Unsupported archirtecture: $ARCH"
;;
esac
# -machdep option sent to frama-c
MACHDEP="-machdep gcc_x$MACHDEPFLAGS"
# Macro for correct preprocessing of Frama-C generated code
CPPMACHDEP="-D__FC_MACHDEP_X$MACHDEPFLAGS"
# CPP and LD flags for compilation of E-ACSL-generated sources # CPP and LD flags for compilation of E-ACSL-generated sources
EACSL_CPP_FLAGS=" EACSL_CPP_FLAGS="
-D__FC_errno=(*__errno_location()) -D__FC_errno=(*__errno_location())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment