0001-GNUmakefile-add-missing-shared-library-symlink.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From e4c2e3bc8174f24cf63923619f5d06d85b84ae1d Mon Sep 17 00:00:00 2001
  2. From: Kamel Bouhara <kamel.bouhara@bootlin.com>
  3. Date: Fri, 7 Jan 2022 22:59:23 +0100
  4. Subject: [PATCH] GNUmakefile: add missing shared library symlink
  5. The GNUmakefile install-lib target currently installs the following
  6. symlink:
  7. libcryptopp.so -> libcryptopp.so.8.6.0
  8. However, it does not create the following symlink:
  9. libcryptopp.so.8 -> libcryptopp.so.8.6.0
  10. This symlink is necessary at runtime because libcryptopp.so.8 is the
  11. SONAME of the cryptopp library, and therefore this is what the dynamic
  12. loader will search when starting a program that is linked against
  13. cryptopp.
  14. For native compilation, the 'ldconfig' invocation that immediately
  15. follows will create that symlink, so everything works.
  16. For cross-compilation however, ldconfig can't be used, and therefore
  17. LDCONFIG is passed as /bin/true, and therefore it doesn't create the
  18. symlink. So instead, create it directly inside the GNUmakefile,
  19. without relying on ldconfig.
  20. Upstream: https://github.com/weidai11/cryptopp/pull/1101
  21. Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
  22. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  23. ---
  24. GNUmakefile | 1 +
  25. GNUmakefile-cross | 1 +
  26. 2 files changed, 2 insertions(+)
  27. diff --git a/GNUmakefile b/GNUmakefile
  28. index 23273edb..3b55e420 100644
  29. --- a/GNUmakefile
  30. +++ b/GNUmakefile
  31. @@ -1412,6 +1412,7 @@ ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
  32. $(CHMOD) u=rwx,go=rx $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
  33. ifeq ($(HAS_SOLIB_VERSION),1)
  34. -$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
  35. + -$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
  36. $(LDCONF) $(DESTDIR)$(LIBDIR)
  37. endif
  38. endif
  39. diff --git a/GNUmakefile-cross b/GNUmakefile-cross
  40. index 9847f04b..a2b87e4a 100644
  41. --- a/GNUmakefile-cross
  42. +++ b/GNUmakefile-cross
  43. @@ -856,6 +856,7 @@ ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
  44. $(CHMOD) u=rwx,go=rx $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
  45. ifeq ($(HAS_SOLIB_VERSION),1)
  46. -$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
  47. + -$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
  48. $(LDCONF) $(DESTDIR)$(LIBDIR)
  49. endif
  50. endif
  51. --
  52. 2.33.1