0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From d5cbb4f43cc9c30100fbf18a3e0d1fb95e1c1b0a Mon Sep 17 00:00:00 2001
  2. From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  3. Date: Wed, 25 Nov 2015 10:50:00 +0000
  4. Subject: [PATCH] mdrestore, scrub: do not do dynamic linking of libtool
  5. libraries
  6. As explained in commit ece49daeff1a3cad765e106d678c608925c9d768, use
  7. -static-libtool-libs instead of -static to allow fallback to the dynamic
  8. linking for libuuid only. Otherwise the build will fail like this:
  9. ld: attempted static link of dynamic object `/usr/lib/libuuid.so'
  10. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  11. [Sent upstream: https://www.spinics.net/lists/xfs/msg36149.html]
  12. [baruch: update for v4.15.1; extend to include scrub]
  13. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  14. [matt: update for v4.16.1; adjusted libunistring -> libicu]
  15. Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
  16. ---
  17. mdrestore/Makefile | 2 +-
  18. scrub/Makefile | 2 +-
  19. 2 files changed, 2 insertions(+), 2 deletions(-)
  20. diff --git a/mdrestore/Makefile b/mdrestore/Makefile
  21. index 136ae716d691..75ff1bad78e9 100644
  22. --- a/mdrestore/Makefile
  23. +++ b/mdrestore/Makefile
  24. @@ -10,7 +10,7 @@ CFILES = xfs_mdrestore.c
  25. LLDLIBS = $(LIBXFS) $(LIBFROG) $(LIBRT) $(LIBPTHREAD) $(LIBUUID)
  26. LTDEPENDENCIES = $(LIBXFS) $(LIBFROG)
  27. -LLDFLAGS = -static
  28. +LLDFLAGS = -static-libtool-libs
  29. default: depend $(LTCOMMAND)
  30. diff --git a/scrub/Makefile b/scrub/Makefile
  31. index 063279400262..949f6fd8ba94 100644
  32. --- a/scrub/Makefile
  33. +++ b/scrub/Makefile
  34. @@ -70,7 +70,7 @@ xfs_scrub.c
  35. LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBICU_LIBS) $(LIBRT)
  36. LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG)
  37. -LLDFLAGS = -static
  38. +LLDFLAGS = -static-libtool-libs
  39. ifeq ($(HAVE_MALLINFO),yes)
  40. LCFLAGS += -DHAVE_MALLINFO
  41. --
  42. 2.16.2