Browse Source

Fixed static lvm2 by compiling in a right way for static binaries

early
Alejandro Mery 18 years ago
parent
commit
b303d38673
  1. 25
      base/lvm2/dietlibc.patch
  2. 46
      base/lvm2/no_dynamic.diff

25
base/lvm2/dietlibc.patch

@ -0,0 +1,25 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../lvm2/dietlibc.patch
# Copyright (C) 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- ./lib/misc/lib.h.orig 2007-07-18 21:00:06.000000000 -0400
+++ ./lib/misc/lib.h 2007-07-18 21:00:36.000000000 -0400
@@ -31,5 +31,6 @@
#include "lvm-wrappers.h"
#include <libdevmapper.h>
+#include <stdint.h>
#endif

46
base/lvm2/no_dynamic.diff

@ -52,22 +52,34 @@
INSTALL_TARGETS += $(INSTALL_CMDLIB_TARGETS) INSTALL_TARGETS += $(INSTALL_CMDLIB_TARGETS)
endif endif
@@ -168,9 +167,16 @@ --- ./tools/Makefile.in.orig 2007-07-18 20:11:11.000000000 -0400
done; \ +++ ./tools/Makefile.in 2007-07-18 20:12:41.000000000 -0400
) @@ -105,7 +105,7 @@
-install_tools_static: lvm.static lvm.static: $(OBJECTS) lvm-static.o $(top_srcdir)/lib/liblvm.a
+install_tools_static: lvm.static .commands $(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm-static.o -static \
$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm.static \ - $(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic
- $(staticdir)/lvm.static + $(LDFLAGS) $(LVMLIBS) $(LIBS)
+ $(staticdir)/lvm
+ @echo Creating symbolic links for individual commands in $(sbindir)
+ @( \
+ for v in `cat .commands`; do \
+ cd $(sbindir); \
+ $(LN_S) -f lvm $$v; \
+ done; \
+ )
install: $(INSTALL_TARGETS)
liblvm2cmd.a: $(top_srcdir)/lib/liblvm.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
cat $(top_srcdir)/lib/liblvm.a > $@
--- ./configure.orig 2007-07-18 20:19:25.000000000 -0400
+++ ./configure 2007-07-18 20:19:44.000000000 -0400
@@ -1948,7 +1948,6 @@
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
LIB_SUFFIX="so"
DEVMAPPER=yes
ODIRECT=yes
--- ./configure.in.orig 2007-07-18 20:22:31.000000000 -0400
+++ ./configure.in 2007-07-18 20:22:42.000000000 -0400
@@ -37,7 +37,6 @@
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
LIB_SUFFIX="so"
DEVMAPPER=yes
ODIRECT=yes

Loading…
Cancel
Save