mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Avoid static link failure with some SELinux libraries.
Author: Jim Meyering <jim@meyering.net>
This commit is contained in:
parent
3851b7a364
commit
66e941e83f
@ -1,5 +1,6 @@
|
||||
Version 2.02.29 -
|
||||
==================================
|
||||
Avoid static link failure with some SELinux libraries.
|
||||
Diagnose invalid PE values given on the pvmove command line (64-bit systems).
|
||||
Include strerror string in dev_open_flags' stat failure message.
|
||||
Move guts of pvresize into library.
|
||||
|
13
configure.in
13
configure.in
@ -453,6 +453,18 @@ if test x$SELINUX = xyes; then
|
||||
else
|
||||
AC_MSG_WARN(Disabling selinux)
|
||||
fi
|
||||
|
||||
# With --enable-static_link and selinux enabled, linking lvm.static
|
||||
# fails on at least Debian unstable due to unsatisfied references
|
||||
# to pthread_mutex_lock and _unlock. See if we need -lpthread.
|
||||
if test "$STATIC_LINK-$HAVE_SELINUX" = yes-yes; then
|
||||
lvm_saved_libs=$LIBS
|
||||
LIBS="$LIBS -static"
|
||||
AC_SEARCH_LIBS([pthread_mutex_lock], [pthread],
|
||||
[test "$ac_cv_search_pthread_mutex_lock" = "none required" ||
|
||||
LIB_PTHREAD=-lpthread])
|
||||
LIBS=$lvm_saved_libs
|
||||
fi
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
@ -617,6 +629,7 @@ AC_SUBST(FSADM)
|
||||
AC_SUBST(DMEVENTD)
|
||||
AC_SUBST(CFLOW_CMD)
|
||||
AC_SUBST(CSCOPE_CMD)
|
||||
AC_SUBST([LIB_PTHREAD])
|
||||
|
||||
################################################################################
|
||||
dnl -- First and last lines should not contain files to generate in order to
|
||||
|
@ -105,9 +105,10 @@ lvm: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a
|
||||
$(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm.o \
|
||||
$(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic
|
||||
|
||||
LIB_PTHREAD = @LIB_PTHREAD@
|
||||
lvm.static: $(OBJECTS) lvm-static.o $(top_srcdir)/lib/liblvm.a
|
||||
$(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm-static.o -static \
|
||||
$(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic
|
||||
$(LDFLAGS) $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic
|
||||
|
||||
liblvm2cmd.a: $(top_srcdir)/lib/liblvm.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
|
||||
cat $(top_srcdir)/lib/liblvm.a > $@
|
||||
@ -173,4 +174,3 @@ install_tools_static: lvm.static
|
||||
$(staticdir)/lvm.static
|
||||
|
||||
install: $(INSTALL_TARGETS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user