0001-xfsprogs-replaces-static-with-static-libtool-libs.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. From 837e0a3bfe4b414a48c77aaf930b5e04b4e2c5e5 Mon Sep 17 00:00:00 2001
  2. From: Romain Naour <romain.naour@openwide.fr>
  3. Date: Tue, 16 Dec 2014 22:06:26 +0100
  4. Subject: [PATCH 1/1] xfsprogs: replaces -static with -static-libtool-libs
  5. xfsprogs relies on the original behaviour of -static which was
  6. modified by [1]. But since commit [2] the build of xfsprogs tools is
  7. broken because they try to link statically with the static libuuid
  8. library (util-linux), which is not built for shared only builds.
  9. The use of -static-libtool-libs allows to fallback to the dynamic
  10. linking for libuuid only:
  11. LD_TRACE_LOADED_OBJECTS=1 xfs_copy
  12. linux-gate.so.1 => (0xf7793000)
  13. libuuid.so.1 => /lib/libuuid.so.1 (0x465e1000)
  14. libpthread.so.0 => /lib/libpthread.so.0 (0x46db1000)
  15. librt.so.1 => /lib/librt.so.1 (0x46f21000)
  16. libc.so.6 => /lib/libc.so.6 (0x46bf1000)
  17. /lib/ld-linux.so.2 (0x46bce000)
  18. [1] http://git.buildroot.net/buildroot/commit/?id=97703978ac870ce2b14ad144f8e082de82aa2c64
  19. [2] http://git.buildroot.net/buildroot/commit/?id=f1d3e09895b245da9d54bbaef36e5de95269034e
  20. Signed-off-by: Romain Naour <romain.naour@openwide.fr>
  21. ---
  22. copy/Makefile | 2 +-
  23. db/Makefile | 2 +-
  24. growfs/Makefile | 2 +-
  25. io/Makefile | 2 +-
  26. logprint/Makefile | 2 +-
  27. mkfs/Makefile | 2 +-
  28. repair/Makefile | 2 +-
  29. 7 files changed, 7 insertions(+), 7 deletions(-)
  30. diff --git a/copy/Makefile b/copy/Makefile
  31. index 54f6dfb..beabbd4 100644
  32. --- a/copy/Makefile
  33. +++ b/copy/Makefile
  34. @@ -11,7 +11,7 @@ HFILES = xfs_copy.h
  35. LLDLIBS = $(LIBXFS) $(LIBUUID) $(LIBPTHREAD) $(LIBRT)
  36. LTDEPENDENCIES = $(LIBXFS)
  37. -LLDFLAGS = -static
  38. +LLDFLAGS = -static-libtool-libs
  39. default: depend $(LTCOMMAND)
  40. diff --git a/db/Makefile b/db/Makefile
  41. index 5c7d054..b4c49c6 100644
  42. --- a/db/Makefile
  43. +++ b/db/Makefile
  44. @@ -18,7 +18,7 @@ LSRCFILES = xfs_admin.sh xfs_check.sh xfs_ncheck.sh xfs_metadump.sh
  45. LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
  46. LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG)
  47. -LLDFLAGS += -static
  48. +LLDFLAGS += -static-libtool-libs
  49. ifeq ($(ENABLE_READLINE),yes)
  50. LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
  51. diff --git a/growfs/Makefile b/growfs/Makefile
  52. index 88cbf4f..19616de 100644
  53. --- a/growfs/Makefile
  54. +++ b/growfs/Makefile
  55. @@ -19,7 +19,7 @@ LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
  56. endif
  57. LTDEPENDENCIES = $(LIBXFS) $(LIBXCMD)
  58. -LLDFLAGS = -static
  59. +LLDFLAGS = -static-libtool-libs
  60. LSRCFILES = xfs_info.sh
  61. default: depend $(LTCOMMAND)
  62. diff --git a/io/Makefile b/io/Makefile
  63. index 50edf91..89b465b 100644
  64. --- a/io/Makefile
  65. +++ b/io/Makefile
  66. @@ -14,7 +14,7 @@ CFILES = init.c \
  67. LLDLIBS = $(LIBXCMD) $(LIBHANDLE)
  68. LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE)
  69. -LLDFLAGS = -static
  70. +LLDFLAGS = -static-libtool-libs
  71. ifeq ($(HAVE_FADVISE),yes)
  72. CFILES += fadvise.c
  73. diff --git a/logprint/Makefile b/logprint/Makefile
  74. index 2d656a4..7bcf27f 100644
  75. --- a/logprint/Makefile
  76. +++ b/logprint/Makefile
  77. @@ -14,7 +14,7 @@ CFILES = logprint.c \
  78. LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
  79. LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG)
  80. -LLDFLAGS = -static
  81. +LLDFLAGS = -static-libtool-libs
  82. default: depend $(LTCOMMAND)
  83. diff --git a/mkfs/Makefile b/mkfs/Makefile
  84. index 75da633..fd1f615 100644
  85. --- a/mkfs/Makefile
  86. +++ b/mkfs/Makefile
  87. @@ -21,7 +21,7 @@ endif
  88. LLDLIBS += $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
  89. LTDEPENDENCIES += $(LIBXFS)
  90. -LLDFLAGS = -static
  91. +LLDFLAGS = -static-libtool-libs
  92. LSRCFILES = $(FSTYP).c
  93. LDIRT = $(FSTYP)
  94. diff --git a/repair/Makefile b/repair/Makefile
  95. index b0e03f8..e9db30f 100644
  96. --- a/repair/Makefile
  97. +++ b/repair/Makefile
  98. @@ -22,7 +22,7 @@ CFILES = agheader.c attr_repair.c avl.c avl64.c bmap.c btree.c \
  99. LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
  100. LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG)
  101. -LLDFLAGS = -static
  102. +LLDFLAGS = -static-libtool-libs
  103. default: depend $(LTCOMMAND)
  104. --
  105. 1.9.3