configure: Enable coverage for all plugins via PLUGIN_CFLAGS

This commit is contained in:
Tobias Brunner 2017-06-20 13:52:16 +02:00
parent ee41367188
commit 56ffcdb166
4 changed files with 6 additions and 7 deletions

View File

@ -350,6 +350,7 @@ fi
if test -z "$CFLAGS"; then if test -z "$CFLAGS"; then
CFLAGS="-g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign" CFLAGS="-g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign"
fi fi
AC_SUBST(PLUGIN_CFLAGS)
AC_PROG_CC AC_PROG_CC
AM_PROG_CC_C_O AM_PROG_CC_C_O
@ -877,7 +878,7 @@ AC_COMPILE_IFELSE(
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
# GCC, but not MinGW requires -rdynamic for plugins # GCC, but not MinGW requires -rdynamic for plugins
if test x$windows != xtrue; then if test x$windows != xtrue; then
AC_SUBST(PLUGIN_CFLAGS, [-rdynamic]) PLUGIN_CFLAGS="$PLUGIN_CFLAGS -rdynamic"
fi fi
] ]
) )
@ -1233,6 +1234,7 @@ if test x$coverage = xtrue; then
COVERAGE_LDFLAGS="-fprofile-arcs" COVERAGE_LDFLAGS="-fprofile-arcs"
AC_SUBST(COVERAGE_CFLAGS) AC_SUBST(COVERAGE_CFLAGS)
AC_SUBST(COVERAGE_LDFLAGS) AC_SUBST(COVERAGE_LDFLAGS)
PLUGIN_CFLAGS="$PLUGIN_CFLAGS $COVERAGE_CFLAGS"
AC_MSG_NOTICE([coverage enabled, adding "-g -O0" to CFLAGS]) AC_MSG_NOTICE([coverage enabled, adding "-g -O0" to CFLAGS])
CFLAGS="${CFLAGS} -g -O0" CFLAGS="${CFLAGS} -g -O0"

View File

@ -3,8 +3,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan/math/libnttfft -I$(top_srcdir)/src/libstrongswan/math/libnttfft
AM_CFLAGS = \ AM_CFLAGS = \
$(PLUGIN_CFLAGS) \ $(PLUGIN_CFLAGS)
@COVERAGE_CFLAGS@
# these file are also used by bliss_huffman # these file are also used by bliss_huffman
noinst_LTLIBRARIES = libbliss-params.la noinst_LTLIBRARIES = libbliss-params.la

View File

@ -3,8 +3,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan/math/libnttfft -I$(top_srcdir)/src/libstrongswan/math/libnttfft
AM_CFLAGS = \ AM_CFLAGS = \
$(PLUGIN_CFLAGS) \ $(PLUGIN_CFLAGS)
@COVERAGE_CFLAGS@
# these files are also used by the tests, we can't directly refer to them # these files are also used by the tests, we can't directly refer to them
# because of the subdirectory, which would cause distclean to fail # because of the subdirectory, which would cause distclean to fail

View File

@ -2,8 +2,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libstrongswan
AM_CFLAGS = \ AM_CFLAGS = \
$(PLUGIN_CFLAGS) \ $(PLUGIN_CFLAGS)
@COVERAGE_CFLAGS@
if MONOLITHIC if MONOLITHIC
noinst_LTLIBRARIES = libstrongswan-ntru.la noinst_LTLIBRARIES = libstrongswan-ntru.la