]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: remove with-cryptsetup from tools/config-gen.d/all.conf
authorKarel Zak <kzak@redhat.com>
Mon, 31 May 2021 15:44:10 +0000 (17:44 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 31 May 2021 15:44:10 +0000 (17:44 +0200)
Unfortunately libtools is not smart enough to link libblkid
dynamically if we link in-tree static libmount.a for libmount tests.
In this case libtools always uses also libblkid.a, but it's problem
for libcryptsetup which requires versioned symbols from libblkid.so

This is no problem for normal binaries, but for libmount tests only
(where we need static library to by-pass public library API).

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/Makemodule.am
tools/config-gen.d/all.conf

index 0b6e6c4cfb659e4dac2f59a21245e0711492037f..c2579b0acc998e47f6d05e7d4ec7c5b71f77399f 100644 (file)
@@ -92,13 +92,21 @@ check_PROGRAMS += test_mount_monitor
 endif
 
 libmount_tests_cflags  = -DTEST_PROGRAM $(libmount_la_CFLAGS) $(NO_UNUSED_WARN_CFLAGS)
-libmount_tests_ldflags = libblkid.la -static
-libmount_tests_ldadd   = libmount.la $(LDADD) $(REALTIME_LIBS)
+libmount_tests_ldflags = -static
+libmount_tests_ldadd   = libmount.la libblkid.la $(LDADD) $(REALTIME_LIBS)
 
 if HAVE_SELINUX
 libmount_tests_ldadd += $(SELINUX_LIBS)
 endif
 
+if HAVE_CRYPTSETUP
+if CRYPTSETUP_VIA_DLOPEN
+libmount_tests_ldadd += -ldl
+else
+libmount_tests_ldadd += $(CRYPTSETUP_LIBS)
+endif
+endif
+
 test_mount_cache_SOURCES = libmount/src/cache.c
 test_mount_cache_CFLAGS = $(libmount_tests_cflags)
 test_mount_cache_LDFLAGS = $(libmount_tests_ldflags)
index f441252e76398d5b9bea635fa8c5a3a9881a636c..f8860a1e24b16320a1eaa243468de3b3a78a7f01 100644 (file)
@@ -3,4 +3,3 @@ include:core.conf
 --enable-all-programs
 --enable-login-stat-mail
 --with-smack
---with-cryptsetup