diff --git a/Makefile.am b/Makefile.am index 8a33b9e22..91ad16422 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,6 +58,7 @@ if CODE_COVERAGE_ENABLED --ignore-errors source \ --no-checksum \ --compat-libtool \ + --rc geninfo_unexecuted_blocks=1 \ --output-file $(CODE_COVERAGE_INFO) else @echo "You need to run configure with --enable-code-coverage to enable code coverage" diff --git a/m4/knot-code-coverage.m4 b/m4/knot-code-coverage.m4 index 430e1c455..669be287a 100644 --- a/m4/knot-code-coverage.m4 +++ b/m4/knot-code-coverage.m4 @@ -29,7 +29,7 @@ AC_DEFUN([AX_CODE_COVERAGE], [ changequote([,]) dnl Add the coverage flags (clang, gcc) - CFLAGS="$CFLAGS --coverage" - LDFLAGS="$LDFLAGS --coverage" + CFLAGS="$CFLAGS --coverage -fprofile-update=atomic" + LDFLAGS="$LDFLAGS --coverage -fprofile-update=atomic" ]) ]) # AC_CODE_COVERAGE