From: Karel Zak Date: Mon, 31 May 2021 15:44:10 +0000 (+0200) Subject: build-sys: remove with-cryptsetup from tools/config-gen.d/all.conf X-Git-Tag: v2.37~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c0d1934411561684f9c011477e644219d0893a1;p=thirdparty%2Futil-linux.git build-sys: remove with-cryptsetup from tools/config-gen.d/all.conf 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 --- diff --git a/libmount/src/Makemodule.am b/libmount/src/Makemodule.am index 0b6e6c4cfb..c2579b0acc 100644 --- a/libmount/src/Makemodule.am +++ b/libmount/src/Makemodule.am @@ -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) diff --git a/tools/config-gen.d/all.conf b/tools/config-gen.d/all.conf index f441252e76..f8860a1e24 100644 --- a/tools/config-gen.d/all.conf +++ b/tools/config-gen.d/all.conf @@ -3,4 +3,3 @@ include:core.conf --enable-all-programs --enable-login-stat-mail --with-smack ---with-cryptsetup