Skip to content
Snippets Groups Projects
Commit 91379d53 authored by Julien Signoles's avatar Julien Signoles
Browse files

Merge branch 'kostyantyn/feature/debug-fix' into 'master'

Fix wrong compile flags in debug mode during compilation of instrumented executables

There has been an issue in `e-acsl-gcc.sh` where in debug mode source code was compiled with optimization flags. This is fixed in this merge request. Further, this changeset adds `--fno-omit-frama-pointer` flag for cleaner traces.

See merge request !91
parents 10f2e83a fa3b4cca
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,9 @@ mmodel_lib() { ...@@ -128,6 +128,9 @@ mmodel_lib() {
local rt_feature="opt" local rt_feature="opt"
if [ -n "$OPTION_RT_DEBUG" ]; then if [ -n "$OPTION_RT_DEBUG" ]; then
rt_feature="debug" rt_feature="debug"
OPTION_CFLAGS="$OPTION_CFLAGS -O0 -fno-omit-frame-pointer"
else
OPTION_CFLAGS="$OPTION_CFLAGS -O2"
fi fi
local models="$(find $LIBDIR/ -name 'libeacsl-*-rtl-opt.a' -exec basename {} \; \ local models="$(find $LIBDIR/ -name 'libeacsl-*-rtl-opt.a' -exec basename {} \; \
...@@ -485,12 +488,6 @@ CFLAGS="$OPTION_CFLAGS ...@@ -485,12 +488,6 @@ CFLAGS="$OPTION_CFLAGS
-Wno-implicit-function-declaration \ -Wno-implicit-function-declaration \
-Wno-empty-body" -Wno-empty-body"
if test -z "$OPTION_DEBUG_MACRO"; then
CFLAGS="-O2 $CFLAGS"
else
CFLAGS="-O0 $CFLAGS"
fi
# Disable extra warning for clang # Disable extra warning for clang
if [ "`basename $CC`" = 'clang' ]; then if [ "`basename $CC`" = 'clang' ]; then
CFLAGS="-Wno-unknown-warning-option \ CFLAGS="-Wno-unknown-warning-option \
...@@ -600,3 +597,4 @@ if [ -n "$OPTION_COMPILE" ]; then ...@@ -600,3 +597,4 @@ if [ -n "$OPTION_COMPILE" ]; then
done done
fi fi
exit 0; exit 0;
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