Commit 739fb56f5ac21c2f2bd05921a3dba7272428513a

Thomas de Grivel 2024-06-26T21:45:58

fix gcov build

diff --git a/c3s/configure b/c3s/configure
index 9e09d11..929a305 100755
--- a/c3s/configure
+++ b/c3s/configure
@@ -60,11 +60,11 @@ LOCAL_LIBS_ASAN="$LIBC3_ASAN"
 LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS --coverage"
-LDFLAGS_COV="$LDFLAGS"
+CFLAGS_COV="$CFLAGS -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
 LIBC3_COV=../libc3/libc3_cov.la
 LOCAL_LIBS_COV="$LIBC3_COV"
-LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
 
 # Debug config
 CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -ggdb"
diff --git a/ic3/configure b/ic3/configure
index fb42f3a..e20bfd5 100755
--- a/ic3/configure
+++ b/ic3/configure
@@ -74,11 +74,11 @@ LOCAL_LIBS_ASAN="$LIBC3_ASAN"
 LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS --coverage"
-LDFLAGS_COV="$LDFLAGS"
+CFLAGS_COV="$CFLAGS -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
 LIBC3_COV=../libc3/libc3_cov.la
 LOCAL_LIBS_COV="$LIBC3_COV"
-LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
 
 # Debug config
 CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"
diff --git a/libc3/configure b/libc3/configure
index 57c018a..8f1d3de 100755
--- a/libc3/configure
+++ b/libc3/configure
@@ -64,8 +64,8 @@ LDFLAGS_ASAN="$LDFLAGS"
 LIBS_ASAN="$LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS --coverage"
-LDFLAGS_COV="$LDFLAGS"
+CFLAGS_COV="$CFLAGS -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
 LIBS_COV="$LIBS -lgcov"
 
 # Debug config
diff --git a/libc3_window/cairo/xcb/demo/configure b/libc3_window/cairo/xcb/demo/configure
index bdc7074..6db8033 100755
--- a/libc3_window/cairo/xcb/demo/configure
+++ b/libc3_window/cairo/xcb/demo/configure
@@ -69,14 +69,14 @@ LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
 
 # Coverage config
 CPPFLAGS_COV="$CPPFLAGS"
-CFLAGS_COV="$CFLAGS -DDEBUG --coverage"
-LDFLAGS_COV="$LDFLAGS"
+CFLAGS_COV="$CFLAGS -DDEBUG -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
 LOCAL_LIBS_COV="../../../../libc3/libc3_cov.la"
 LOCAL_LIBS_COV="$LOCAL_LIBS_COV ../../../libc3_window_cov.la"
 LOCAL_LIBS_COV="$LOCAL_LIBS_COV ../../libc3_window_cairo_cov.la"
 LOCAL_LIBS_COV="$LOCAL_LIBS_COV ../../demo/libc3_window_cairo_demo_cov.la"
 LOCAL_LIBS_COV="$LOCAL_LIBS_COV ../libc3_window_cairo_xcb_cov.la"
-LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
 
 # Debug config
 CPPFLAGS_DEBUG="$CPPFLAGS"
diff --git a/libc3_window/sdl2/demo/configure b/libc3_window/sdl2/demo/configure
index 8addd54..6a292a2 100755
--- a/libc3_window/sdl2/demo/configure
+++ b/libc3_window/sdl2/demo/configure
@@ -78,12 +78,12 @@ LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
 
 # Coverage config
 CPPFLAGS_COV="$CPPFLAGS"
-CFLAGS_COV="$CFLAGS -DDEBUG --coverage"
-LDFLAGS_COV="$LDFLAGS"
+CFLAGS_COV="$CFLAGS -DDEBUG -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
 LOCAL_LIBS_COV="../../../libc3/libc3_cov.la"
 LOCAL_LIBS_COV="$LOCAL_LIBS_COV ../../libc3_window_cov.la"
 LOCAL_LIBS_COV="$LOCAL_LIBS_COV ../libc3_window_sdl2_cov.la"
-LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
 
 # Debug config
 CPPFLAGS_DEBUG="$CPPFLAGS"
diff --git a/test/configure b/test/configure
index 12c6d41..5418ce6 100755
--- a/test/configure
+++ b/test/configure
@@ -58,11 +58,11 @@ LOCAL_LIBS_ASAN="$LIBC3_ASAN"
 LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
 
 # Coverage config
-CFLAGS_COV="$CFLAGS --coverage"
-LDFLAGS_COV="$LDFLAGS"
+CFLAGS_COV="$CFLAGS -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
 LIBC3_COV=../libc3/libc3_cov.la
 LOCAL_LIBS_COV="$LIBC3_COV"
-LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
 
 # Debug config
 CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"