tests: When BUILD_STATIC always link against libeu

Message ID 20240821135221.1188336-1-mark@klomp.org
State Committed
Headers
Series tests: When BUILD_STATIC always link against libeu |

Commit Message

Mark Wielaard Aug. 21, 2024, 1:52 p.m. UTC
  libeu is a static library with internal helper functions normally
included in all shared libraries. But when linking static (with
--enable-gcov) we need to explicitly link it into the test binaries.

       * tests/Makefile.am (libelf): Add $(libeu) when BUILD_STATIC.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Mark Wielaard Aug. 21, 2024, 10:40 p.m. UTC | #1
Hi,

On Wed, Aug 21, 2024 at 03:52:20PM +0200, Mark Wielaard wrote:
> libeu is a static library with internal helper functions normally
> included in all shared libraries. But when linking static (with
> --enable-gcov) we need to explicitly link it into the test binaries.
> 
>        * tests/Makefile.am (libelf): Add $(libeu) when BUILD_STATIC.

Aaron setup a debian coverage try builder and together with the
previous patch this made it pass.

Pushed,

Mark
  

Patch

diff --git a/tests/Makefile.am b/tests/Makefile.am
index aee5413fd31f..cdb2d405d212 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -723,7 +723,7 @@  installcheck-local:
 
 if BUILD_STATIC
 libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
-libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
+libelf = ../libelf/libelf.a -lz $(zstd_LIBS) $(libeu)
 libasm = ../libasm/libasm.a
 else
 libdw = ../libdw/libdw.so