Commit 37b09c7252fc487e227e6961d5ed0e673f8acdbc

Thomas de Grivel 2023-08-21T11:35:20

wip cov

diff --git a/ic3/configure b/ic3/configure
index 975caf1..30f4fa5 100755
--- a/ic3/configure
+++ b/ic3/configure
@@ -64,11 +64,11 @@ LOCAL_LIBS_ASAN="$LIBC3_ASAN"
 LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs"
+CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
 LDFLAGS_COV="$LDFLAGS --coverage"
 LIBC3_COV=../libc3/libc3_cov.la
 LOCAL_LIBS_COV="$LIBC3_COV"
-LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS"
 
 # Debug config
 CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -ggdb"
diff --git a/libc3/configure b/libc3/configure
index bceb88d..1d3d309 100755
--- a/libc3/configure
+++ b/libc3/configure
@@ -62,9 +62,9 @@ LDFLAGS_ASAN="$LDFLAGS"
 LIBS_ASAN="$LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs"
+CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
 LDFLAGS_COV="$LDFLAGS --coverage"
-LIBS_COV="$LIBS -lgcov"
+LIBS_COV="$LIBS"
 
 # Debug config
 CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -ggdb"
diff --git a/test/configure b/test/configure
index 924461a..65166eb 100755
--- a/test/configure
+++ b/test/configure
@@ -51,13 +51,13 @@ LIBS="${LIBS:=} -lm"
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
 CPPFLAGS="$CPPFLAGS -I../libffi/include"
+LIBS="$LIBS ../libffi/libffi.la -pthread"
 config_asan
 config_gnu
 pkg_config libbsd-overlay
 pkg_config libmd
 config_lib libmd -lmd
 config_lib dl -ldl
-LIBS="$LIBS ../libffi/libffi.la -pthread"
 
 # Asan config
 CFLAGS_ASAN="$CFLAGS -fsanitize=address -O1 -fno-omit-frame-pointer -g"
@@ -66,7 +66,7 @@ LIBC3_ASAN=../libc3/libc3_asan.la
 LIBS_ASAN="$LIBC3_ASAN $LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs"
+CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
 LDFLAGS_COV="$LDFLAGS"
 LIBC3_COV=../libc3/libc3_cov.la
 LIBS_COV="$LIBC3_COV $LIBS"