vanhofen
4 years ago
2 changed files with 96 additions and 0 deletions
@ -0,0 +1,52 @@ |
|||||
|
From d5cbb4f43cc9c30100fbf18a3e0d1fb95e1c1b0a Mon Sep 17 00:00:00 2001 |
||||
|
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com> |
||||
|
Date: Wed, 25 Nov 2015 10:50:00 +0000 |
||||
|
Subject: [PATCH] mdrestore, scrub: do not do dynamic linking of libtool |
||||
|
libraries |
||||
|
|
||||
|
As explained in commit ece49daeff1a3cad765e106d678c608925c9d768, use |
||||
|
-static-libtool-libs instead of -static to allow fallback to the dynamic
|
||||
|
linking for libuuid only. Otherwise the build will fail like this: |
||||
|
|
||||
|
ld: attempted static link of dynamic object `/usr/lib/libuuid.so' |
||||
|
|
||||
|
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> |
||||
|
[Sent upstream: https://www.spinics.net/lists/xfs/msg36149.html] |
||||
|
[baruch: update for v4.15.1; extend to include scrub] |
||||
|
Signed-off-by: Baruch Siach <baruch@tkos.co.il> |
||||
|
[matt: update for v4.16.1; adjusted libunistring -> libicu] |
||||
|
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com> |
||||
|
---
|
||||
|
mdrestore/Makefile | 2 +- |
||||
|
scrub/Makefile | 2 +- |
||||
|
2 files changed, 2 insertions(+), 2 deletions(-) |
||||
|
|
||||
|
diff --git a/mdrestore/Makefile b/mdrestore/Makefile
|
||||
|
index 136ae716d691..75ff1bad78e9 100644
|
||||
|
--- a/mdrestore/Makefile
|
||||
|
+++ b/mdrestore/Makefile
|
||||
|
@@ -10,7 +10,7 @@ CFILES = xfs_mdrestore.c
|
||||
|
|
||||
|
LLDLIBS = $(LIBXFS) $(LIBFROG) $(LIBRT) $(LIBPTHREAD) $(LIBUUID) |
||||
|
LTDEPENDENCIES = $(LIBXFS) $(LIBFROG) |
||||
|
-LLDFLAGS = -static
|
||||
|
+LLDFLAGS = -static-libtool-libs
|
||||
|
|
||||
|
default: depend $(LTCOMMAND) |
||||
|
|
||||
|
diff --git a/scrub/Makefile b/scrub/Makefile
|
||||
|
index 063279400262..949f6fd8ba94 100644
|
||||
|
--- a/scrub/Makefile
|
||||
|
+++ b/scrub/Makefile
|
||||
|
@@ -70,7 +70,7 @@ xfs_scrub.c
|
||||
|
|
||||
|
LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBICU_LIBS) $(LIBRT) |
||||
|
LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG) |
||||
|
-LLDFLAGS = -static
|
||||
|
+LLDFLAGS = -static-libtool-libs
|
||||
|
|
||||
|
ifeq ($(HAVE_MALLINFO),yes) |
||||
|
LCFLAGS += -DHAVE_MALLINFO |
||||
|
--
|
||||
|
2.16.2 |
||||
|
|
@ -0,0 +1,44 @@ |
|||||
|
From 3a77dfc54271059dcac305384bf6ace34fe1f3d3 Mon Sep 17 00:00:00 2001 |
||||
|
From: "Yann E. MORIN" <yann.morin.1998@free.fr> |
||||
|
Date: Sun, 18 Dec 2016 15:37:27 +0100 |
||||
|
Subject: [PATCH] libxfs: do not try to run the crc32selftest |
||||
|
|
||||
|
Even though the crc32selftest is natively compiled (because it is to be |
||||
|
executed), it fails in cross-compilation as the host may lack the |
||||
|
required headers, like uuid/uuid.h (e.g. in a minimal environment). |
||||
|
|
||||
|
Moreover, running the crc32selftest natively is completely wrong, |
||||
|
because it passing on the host does not mean it would still pass n the |
||||
|
target (because endianness or bitness or alignment differences). |
||||
|
|
||||
|
So, just disable running the crc32selftest altogether. |
||||
|
|
||||
|
Note that there's a remaining bug-in-hiding, because the crc32 table |
||||
|
generator is natively built, but with the target CFLAGS. |
||||
|
|
||||
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> |
||||
|
Signed-off-by: "Fabrice Fontaine" <fontaine.fabrice@gmail.com> |
||||
|
[Update for 4.18.0: crc32 has been moved from libxfs to libfrog] |
||||
|
---
|
||||
|
libxfs/Makefile | 4 ++-- |
||||
|
1 file changed, 2 insertions(+), 2 deletions(-) |
||||
|
|
||||
|
diff --git a/libfrog/Makefile b/libxfs/Makefile
|
||||
|
index 62608bd..e021625 100644
|
||||
|
--- a/libfrog/Makefile
|
||||
|
+++ b/libfrog/Makefile
|
||||
|
@@ -112,9 +112,9 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT)
|
||||
|
# don't try linking xfs_repair with a debug libxfs. |
||||
|
DEBUG = -DNDEBUG |
||||
|
|
||||
|
-LDIRT = gen_crc32table crc32table.h crc32selftest
|
||||
|
+LDIRT = gen_crc32table crc32table.h
|
||||
|
|
||||
|
-default: crc32selftest ltdepend $(LTLIBRARY)
|
||||
|
+default: ltdepend $(LTLIBRARY)
|
||||
|
|
||||
|
crc32table.h: gen_crc32table.c |
||||
|
@echo " [CC] gen_crc32table" |
||||
|
--
|
||||
|
2.7.4 |
||||
|
|
Loading…
Reference in new issue