]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix BUILD_STATIC build and enable gcov for debuginfod.
authorMark Wielaard <mark@klomp.org>
Tue, 26 Nov 2019 07:56:44 +0000 (08:56 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 26 Nov 2019 07:56:44 +0000 (08:56 +0100)
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>
ChangeLog
configure.ac
debuginfod/ChangeLog
debuginfod/Makefile.am
src/ChangeLog
src/Makefile.am
tests/ChangeLog
tests/Makefile.am
tests/coverage.sh

index 9d1c05f446e94f762d5dbd67ea6955915fbd8025..3d0756bed361eafd5bce920e894721ee1d39b15d 100644 (file)
--- 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.
index 5deec33689ee72927f3baa6a2295f32ef7d597d6..dc553bb680db95ad4f563b8ef4a8486d6719d76f 100644 (file)
@@ -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)
index 4df45d83edd02a79faab608e2b432716c1da8e40..8aa29443e5f48f667ce9c81fe35601a0b2ebe767 100644 (file)
@@ -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()
index ec0f49f1118c3a6416d7fe01bf9a5a3b16971b22..52ead30aebf82a8040d9d04ade68d29f534e2e3b 100644 (file)
@@ -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
index 3144c935f433c68237030f433a8298b7f5992f5c..6af977ed06245fdcfabe623076f2c13f7c4060b8 100644 (file)
@@ -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
index ab72a0e903e1fe016a25bf568a044d36f14add7a..e462e7d7af32e02bb024fa032f58c977052a8f9b 100644 (file)
@@ -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
index 27bc4ec2aabf6a86f3c3fcd00c66af49b0f410cb..6e3923f5d3e48e393fa87951d59580d750b5386a 100644 (file)
@@ -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
index 83d27a06744f4bfa38684b88a5b4385074a0228c..eab4ae6f2edab9a44824e69e60d920903f44b2b2 100644 (file)
@@ -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
index 5cc353c9ca4b45abf514400c7071525da6d70020..01d292cc35b8bbc9521f09c5b7ea9fdcc7f067eb 100755 (executable)
@@ -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" |