1From 3a77dfc54271059dcac305384bf6ace34fe1f3d3 Mon Sep 17 00:00:00 2001 2From: "Yann E. MORIN" <yann.morin.1998@free.fr> 3Date: Sun, 18 Dec 2016 15:37:27 +0100 4Subject: [PATCH] libxfs: do not try to run the crc32selftest 5 6Even though the crc32selftest is natively compiled (because it is to be 7executed), it fails in cross-compilation as the host may lack the 8required headers, like uuid/uuid.h (e.g. in a minimal environment). 9 10Moreover, running the crc32selftest natively is completely wrong, 11because it passing on the host does not mean it would still pass n the 12target (because endianness or bitness or alignment differences). 13 14So, just disable running the crc32selftest altogether. 15 16Note that there's a remaining bug-in-hiding, because the crc32 table 17generator is natively built, but with the target CFLAGS. 18 19Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> 20Signed-off-by: "Fabrice Fontaine" <fontaine.fabrice@gmail.com> 21[Update for 4.18.0: crc32 has been moved from libxfs to libfrog] 22--- 23 libxfs/Makefile | 4 ++-- 24 1 file changed, 2 insertions(+), 2 deletions(-) 25 26diff --git a/libfrog/Makefile b/libxfs/Makefile 27index 62608bd..e021625 100644 28--- a/libfrog/Makefile 29+++ b/libfrog/Makefile 30@@ -112,9 +112,9 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT) 31 # don't try linking xfs_repair with a debug libxfs. 32 DEBUG = -DNDEBUG 33 34-LDIRT = gen_crc32table crc32table.h crc32selftest 35+LDIRT = gen_crc32table crc32table.h 36 37-default: crc32selftest ltdepend $(LTLIBRARY) 38+default: ltdepend $(LTLIBRARY) 39 40 crc32table.h: gen_crc32table.c 41 @echo " [CC] gen_crc32table" 42-- 432.7.4 44 45