summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2019-11-26 08:56:44 +0100
committerMark Wielaard <mark@klomp.org>2019-11-26 08:56:44 +0100
commit3f81dbd235172709021cc453d256e855d271686e (patch)
tree5dcd976da471b1f955be2e3f89ab361fe5927073
parentedf79a4bbc80b35f40abce73986dc6d6e10d40bc (diff)
Fix BUILD_STATIC build and enable gcov for debuginfod.
libdw now always needs -lpthread and -ld even when BUILD_STATIC. BUILD_STATIC is only used when doing a gcov enabled build. Enable gcov coverage also for debuginfod. Signed-off-by: Mark Wielaard <mark@klomp.org>
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac1
-rw-r--r--debuginfod/ChangeLog5
-rw-r--r--debuginfod/Makefile.am4
-rw-r--r--src/ChangeLog4
-rw-r--r--src/Makefile.am2
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/coverage.sh4
9 files changed, 26 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d1c05f4..3d0756be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-11-26 Mark Wielaard <mark@klomp.org>
+
+ * configure.ac: Add CXXFLAGS for gcov.
+
2019-10-28 Aaron Merey <amerey@redhat.com>
* debuginfod/: New directory for debuginfod code.
diff --git a/configure.ac b/configure.ac
index 5deec336..dc553bb6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,6 +299,7 @@ AC_ARG_ENABLE([gcov],
AS_HELP_STRING([--enable-gcov],[build binaries with gcov support]), [use_gcov=$enableval], [use_gcov=no])
if test "$use_gcov" = yes; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
LDFLAGS="$LDFLAGS -fprofile-arcs"
fi
AM_CONDITIONAL(GCOV, test "$use_gcov" = yes)
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 4df45d83..8aa29443 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-26 Mark Wielaard <mark@klomp.org>
+
+ * Makefile.am (BUILD_STATIC): Add needed libraries for libdw and
+ libdebuginfod.
+
2019-11-25 Frank Ch. Eigler <fche@redhat.com>
* debuginfod.cxx (groom): Add a sqlite3_db_release_memory()
diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am
index ec0f49f1..52ead30a 100644
--- a/debuginfod/Makefile.am
+++ b/debuginfod/Makefile.am
@@ -43,9 +43,9 @@ program_transform_name = s,x,x,
if BUILD_STATIC
libasm = ../libasm/libasm.a
-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
libelf = ../libelf/libelf.a -lz
-libdebuginfod = ./libdebuginfod.a
+libdebuginfod = ./libdebuginfod.a $(libcurl_LIBS)
else
libasm = ../libasm/libasm.so
libdw = ../libdw/libdw.so
diff --git a/src/ChangeLog b/src/ChangeLog
index 3144c935..6af977ed 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2019-11-26 Mark Wielaard <mark@klomp.org>
+
+ * Makefile.am (BUILD_STATIC): Add libraries needed for libdw.
+
2019-10-26 Mark Wielaard <mark@klomp.org>
* unstrip.c (collect_symbols): Check symbol strings are
diff --git a/src/Makefile.am b/src/Makefile.am
index ab72a0e9..e462e7d7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,7 +41,7 @@ CLEANFILES += make-debug-archive
if BUILD_STATIC
libasm = ../libasm/libasm.a
-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf)
+libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
libelf = ../libelf/libelf.a -lz
else
libasm = ../libasm/libasm.so
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 27bc4ec2..6e3923f5 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-26 Mark Wielaard <mark@klomp.org>
+
+ * Makefile.am (BUILD_STATIC): Add libraries needed for libdw.
+ * coverage.sh: Add debuginfod directory, check whether source
+ is .c or cxx.
+
2019-11-24 Mark Wielaard <mark@klomp.org>
* run-debuginfod-find.sh: Reduce verbosity. Add new cleanup
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 83d27a06..eab4ae6f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -512,7 +512,7 @@ libasm = -lasm
libebl = -lebl
else !STANDALONE
if BUILD_STATIC
-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl)
+libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
libelf = ../libelf/libelf.a -lz
libasm = ../libasm/libasm.a
else
diff --git a/tests/coverage.sh b/tests/coverage.sh
index 5cc353c9..01d292cc 100755
--- a/tests/coverage.sh
+++ b/tests/coverage.sh
@@ -8,14 +8,14 @@ fi
cd ..
-for d in lib libasm libdw libdwfl libebl libelf backends src; do
+for d in lib libasm libdw libdwfl libebl libelf backends src debuginfod; do
tmp=$d-data
cd $d
unused=0
unused_files=
for f in *.gcno; do
base="$(basename $f .gcno)"
- fc="$base.c"
+ if [ -f "$base.c" ]; then fc="$base.c"; else fc="$base.cxx"; fi
gcda="$base.gcda"
if [ -f "$gcda" ]; then
gcov -n -a "$fc" |