0002-libxfs-do-not-try-to-run-the-crc32selftest.patch 1.5 KB

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