From 57727bb4ebffb30cf21b151cc2f66bfd7d924a81 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 31 Jul 2017 23:56:58 +0200 Subject: [PATCH] makefiles: RT_LIB Link -lrt directly only with libdevmapper. All other users get dependency transiently. --- configure | 2 +- configure.in | 2 +- libdm/Makefile.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index e1ae0e884..8396e3ee3 100755 --- a/configure +++ b/configure @@ -3170,6 +3170,7 @@ fi case "$host_os" in linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + # equivalent to -rdynamic ELDFLAGS="-Wl,--export-dynamic" # FIXME Generate list and use --dynamic-list=.dlopen.sym CLDWHOLEARCHIVE="-Wl,-whole-archive" @@ -14363,7 +14364,6 @@ fi $as_echo "#define HAVE_REALTIME 1" >>confdefs.h - LIBS="-lrt $LIBS" RT_LIB="-lrt" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling realtime clock" >&5 diff --git a/configure.in b/configure.in index 2e5e015c8..4e1367957 100644 --- a/configure.in +++ b/configure.in @@ -31,6 +31,7 @@ AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"]) case "$host_os" in linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + # equivalent to -rdynamic ELDFLAGS="-Wl,--export-dynamic" # FIXME Generate list and use --dynamic-list=.dlopen.sym CLDWHOLEARCHIVE="-Wl,-whole-archive" @@ -1675,7 +1676,6 @@ if test "$REALTIME" = yes; then if test "$HAVE_REALTIME" = yes; then AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.]) - LIBS="-lrt $LIBS" RT_LIB="-lrt" else AC_MSG_WARN(Disabling realtime clock) diff --git a/libdm/Makefile.in b/libdm/Makefile.in index 3c9a4cefd..5adf99292 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -56,7 +56,7 @@ include $(top_builddir)/make.tmpl CFLAGS += $(UDEV_CFLAGS) $(VALGRIND_CFLAGS) -LIBS += $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) +LIBS += $(RT_LIB) $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) device-mapper: all