1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Make dmsetup.static and lvm.static build when dmeventd is disabled.

udev may also need to be disabled if you didn't build it statically too.

dmeventd.static could be fixed with some more work but I don't really see the
point: without dlopen() it's useless, and if you have dlopen(), why not support
normal shared libraries too?
This commit is contained in:
Alasdair Kergon 2011-11-14 21:30:35 +00:00
parent 2ce5ca4375
commit bf09a32006
6 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 - Version 2.02.89 -
================================== ==================================
Fix --enable-static_link unless using --enable-dmeventd / --enable-udev_sync.
Move gentoo MAKEDEV to /sbin in lvm2create_initrd. Move gentoo MAKEDEV to /sbin in lvm2create_initrd.
Add filter to avoid scan of device if it is part of active multipath. Add filter to avoid scan of device if it is part of active multipath.
Add missing default $LVM_VG_NAME usage for snapshots. Add missing default $LVM_VG_NAME usage for snapshots.

6
configure vendored
View File

@ -643,6 +643,7 @@ INTL
HAVE_REALTIME HAVE_REALTIME
HAVE_LIBDL HAVE_LIBDL
FSADM FSADM
ELDFLAGS
DM_LIB_PATCHLEVEL DM_LIB_PATCHLEVEL
DM_LIB_VERSION DM_LIB_VERSION
DM_IOCTLS DM_IOCTLS
@ -2807,10 +2808,11 @@ case "$host_os" in
CFLAGS="$CFLAGS" CFLAGS="$CFLAGS"
COPTIMISE_FLAG="-O2" COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive" CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym" LDDEPS="$LDDEPS .export.sym"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
LIB_SUFFIX=so LIB_SUFFIX=so
DEVMAPPER=yes DEVMAPPER=yes
LVMETAD=no LVMETAD=no
@ -2824,6 +2826,7 @@ case "$host_os" in
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
COPTIMISE_FLAG="-O2" COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS" CLDFLAGS="$CLDFLAGS"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load" CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE= CLDNOWHOLEARCHIVE=
LIB_SUFFIX=dylib LIB_SUFFIX=dylib
@ -10209,6 +10212,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################ ################################################################################

View File

@ -31,10 +31,11 @@ case "$host_os" in
CFLAGS="$CFLAGS" CFLAGS="$CFLAGS"
COPTIMISE_FLAG="-O2" COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive" CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym" LDDEPS="$LDDEPS .export.sym"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
LIB_SUFFIX=so LIB_SUFFIX=so
DEVMAPPER=yes DEVMAPPER=yes
LVMETAD=no LVMETAD=no
@ -48,6 +49,7 @@ case "$host_os" in
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
COPTIMISE_FLAG="-O2" COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS" CLDFLAGS="$CLDFLAGS"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load" CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE= CLDNOWHOLEARCHIVE=
LIB_SUFFIX=dylib LIB_SUFFIX=dylib
@ -1342,6 +1344,7 @@ AC_SUBST(DM_DEVICE_UID)
AC_SUBST(DM_IOCTLS) AC_SUBST(DM_IOCTLS)
AC_SUBST(DM_LIB_VERSION) AC_SUBST(DM_LIB_VERSION)
AC_SUBST(DM_LIB_PATCHLEVEL) AC_SUBST(DM_LIB_PATCHLEVEL)
AC_SUBST(ELDFLAGS)
AC_SUBST(FSADM) AC_SUBST(FSADM)
AC_SUBST(HAVE_LIBDL) AC_SUBST(HAVE_LIBDL)
AC_SUBST(HAVE_REALTIME) AC_SUBST(HAVE_REALTIME)

View File

@ -60,11 +60,11 @@ LIBS += -ldevmapper
LVMLIBS += -ldevmapper-event $(PTHREAD_LIBS) LVMLIBS += -ldevmapper-event $(PTHREAD_LIBS)
dmeventd: $(LIB_SHARED) dmeventd.o dmeventd: $(LIB_SHARED) dmeventd.o
$(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@ dmeventd.o \ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -L. -o $@ dmeventd.o \
$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
$(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS) dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
ifeq ("@PKGCONFIG@", "yes") ifeq ("@PKGCONFIG@", "yes")

View File

@ -35,6 +35,7 @@ STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
DEFS += @DEFS@ DEFS += @DEFS@
CFLAGS += @CFLAGS@ CFLAGS += @CFLAGS@
CLDFLAGS += @CLDFLAGS@ CLDFLAGS += @CLDFLAGS@
ELDFLAGS += @ELDFLAGS@
LDDEPS += @LDDEPS@ LDDEPS += @LDDEPS@
LDFLAGS += @LDFLAGS@ LDFLAGS += @LDFLAGS@
LIB_SUFFIX = @LIB_SUFFIX@ LIB_SUFFIX = @LIB_SUFFIX@

View File

@ -132,7 +132,7 @@ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
all: device-mapper all: device-mapper
lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) lvm.o \ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
$(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a