Skip to content

Commit

Permalink
Add -fprofile-update=atomic to cflags if coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Nov 29, 2023
1 parent 15d08d2 commit 35a5a64
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -919,9 +919,16 @@ AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option], [CFLAGS="-Werror=unknown
if test "$enable_coverage" = "yes";
then
AX_CHECK_COMPILE_FLAG([--coverage],
[save_CFLAGS="--coverage $save_CFLAGS"],
[AC_MSG_ERROR([$CC does not to support test coverage flags])])
[save_CFLAGS="--coverage $save_CFLAGS"],
[AC_MSG_ERROR([$CC does not to support test coverage flags])])
LDFLAGS="--coverage $LDFLAGS"

if test "$enable_pthread" = "yes";
then
AX_CHECK_COMPILE_FLAG([-fprofile-update=atomic],
[save_CFLAGS="-fprofile-update=atomic $save_CFLAGS"],
[AC_MSG_ERROR([$CC does not to support multi-threaded test coverage flags])])
fi
fi

if test "$enable_debug" = "yes";
Expand Down

0 comments on commit 35a5a64

Please sign in to comment.