Make sure that libdm usage always brings in pthread libraries, both in pkgconfig and during manual build. --- tools/Makefile.in +++ tools/Makefile.in @@ -87,6 +87,7 @@ INSTALL_LVM_TARGETS += install_tools_static INSTALL_DMSETUP_TARGETS += install_dmsetup_static INSTALL_CMDLIB_TARGETS += install_cmdlib_static + STATIC_LIBS += @PTHREAD_LIBS@ endif LVMLIBS = $(LVMINTERNAL_LIBS) @@ -118,6 +119,10 @@ include $(top_builddir)/make.tmpl +ifeq ("@STATIC_LINK@", "yes") + STATIC_LIBS += @PTHREAD_LIBS@ +endif + device-mapper: $(TARGETS_DM) CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)