1
0
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:
Jim Meyering 2007-09-12 16:54:23 +00:00
parent 3851b7a364
commit 66e941e83f
4 changed files with 2288 additions and 2012 deletions

View File

@ -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.

4282
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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)