summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-08-24 21:20:14 +0200
committerGuillem Jover <guillem@debian.org>2018-08-30 03:14:09 +0200
commit58fb0496a61053fec3c65a3460f1a47c93d31ff1 (patch)
tree8a6db5a9abd1bd86fc23bf5cb203a4dc430c62e9 /m4
parent85aa070f774df38d1dcf0dc2d451bf6848eee1c6 (diff)
downloaddpkg-58fb0496a61053fec3c65a3460f1a47c93d31ff1.tar.gz
build: Disable C optimization levels when configuring for code coverage
Optimizations mess up the coverage reporting, as the reslting object layout changes substantialy to the point of it not matching what is being actually covered by the test suite.
Diffstat (limited to 'm4')
-rw-r--r--m4/dpkg-coverage.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/dpkg-coverage.m4 b/m4/dpkg-coverage.m4
index 4e14b736a..6cc097d0e 100644
--- a/m4/dpkg-coverage.m4
+++ b/m4/dpkg-coverage.m4
@@ -29,8 +29,8 @@ AC_DEFUN([DPKG_CODE_COVERAGE], [
AC_MSG_ERROR([missing genhtml, which is required for C coverage support])
])
- CFLAGS="$CFLAGS --coverage"
- LDFLAGS="$LDFLAGS --coverage"
+ CFLAGS="$CFLAGS --coverage -O0"
+ LDFLAGS="$LDFLAGS --coverage -O0"
AC_MSG_CHECKING([for Devel::Cover perl module])
AS_IF([$($PERL -e "require Devel::Cover;" 2>/dev/null)], [