lvm2-2.02.92-dynamic-static-ldflags.patch 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/configure.in LVM2.2.02.92/configure.in
  2. --- LVM2.2.02.92.orig/configure.in 2012-02-20 11:36:27.000000000 -0800
  3. +++ LVM2.2.02.92/configure.in 2012-02-20 15:53:40.700124222 -0800
  4. @@ -32,6 +32,7 @@
  5. COPTIMISE_FLAG="-O2"
  6. CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
  7. ELDFLAGS="-Wl,--export-dynamic"
  8. + STATIC_LDFLAGS="-Wl,--no-export-dynamic"
  9. # FIXME Generate list and use --dynamic-list=.dlopen.sym
  10. CLDWHOLEARCHIVE="-Wl,-whole-archive"
  11. CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
  12. @@ -1458,6 +1459,7 @@
  13. AC_SUBST(SELINUX_PC)
  14. AC_SUBST(SNAPSHOTS)
  15. AC_SUBST(STATICDIR)
  16. +AC_SUBST(STATIC_LDFLAGS)
  17. AC_SUBST(STATIC_LINK)
  18. AC_SUBST(TESTING)
  19. AC_SUBST(THIN)
  20. diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in LVM2.2.02.92/daemons/dmeventd/Makefile.in
  21. --- LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in 2012-02-20 15:48:04.861683196 -0800
  22. +++ LVM2.2.02.92/daemons/dmeventd/Makefile.in 2012-02-20 15:52:50.732314588 -0800
  23. @@ -65,7 +65,7 @@
  24. $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
  25. dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
  26. - $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
  27. + $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
  28. dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
  29. ifeq ("@PKGCONFIG@", "yes")
  30. diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/make.tmpl.in LVM2.2.02.92/make.tmpl.in
  31. --- LVM2.2.02.92.orig/make.tmpl.in 2012-02-20 15:48:05.034685963 -0800
  32. +++ LVM2.2.02.92/make.tmpl.in 2012-02-20 15:48:58.622550855 -0800
  33. @@ -38,6 +38,7 @@
  34. ELDFLAGS += @ELDFLAGS@
  35. LDDEPS += @LDDEPS@
  36. LDFLAGS += @LDFLAGS@
  37. +STATIC_LDFLAGS += @STATIC_LDFLAGS@
  38. LIB_SUFFIX = @LIB_SUFFIX@
  39. LVMINTERNAL_LIBS = -llvm-internal $(UDEV_LIBS) $(DL_LIBS)
  40. DL_LIBS = @DL_LIBS@
  41. diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/tools/Makefile.in LVM2.2.02.92/tools/Makefile.in
  42. --- LVM2.2.02.92.orig/tools/Makefile.in 2011-11-14 13:30:36.000000000 -0800
  43. +++ LVM2.2.02.92/tools/Makefile.in 2012-02-20 15:52:25.242901501 -0800
  44. @@ -126,7 +126,7 @@
  45. -o $@ dmsetup.o -ldevmapper $(LIBS)
  46. dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
  47. - $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
  48. + $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
  49. -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
  50. all: device-mapper
  51. @@ -136,7 +136,7 @@
  52. $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
  53. lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
  54. - $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
  55. + $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
  56. $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
  57. liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o