0001-Fix-installation-location-of-libffi.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 580f46a7bc6e9fea3a2227b5268cc3aed1d60e3b Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Thu, 7 Feb 2013 22:26:56 +0100
  4. Subject: [PATCH] Fix installation location of libffi
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The libffi is currently declared as toolexeclib_LTLIBRARIES. In many
  9. cases, toolexeclib libraries will be installed in /usr/lib, so it
  10. doesn't make any difference.
  11. However, with multilib toolchains, they get installed in a
  12. subdirectory of /usr/lib/. For example, with a Sourcery CodeBench
  13. PowerPC toolchain, if the e500mc multilib variant is used, the libffi
  14. library gets installed in /usr/lib/te500mc/. This is due to the
  15. following code in the configure script:
  16. multi_os_directory=`$CC -print-multi-os-directory`
  17. case $multi_os_directory in
  18. .) ;; # Avoid trailing /.
  19. *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
  20. esac
  21. Once the library is installed in /usr/lib/te500mc/, nothing works
  22. because this installation location is inconsistent with the
  23. installation location declared in libffi.pc.
  24. So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use
  25. the more standard lib_LTLIBRARIES, which ensures that the libffi
  26. library is always installed in /usr/lib.
  27. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  28. [unfuzz for 3.2.1]
  29. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
  30. ---
  31. Makefile.am | 2 +-
  32. 1 file changed, 1 insertion(+), 1 deletion(-)
  33. diff --git a/Makefile.am b/Makefile.am
  34. index 0e40451..309474c 100644
  35. --- a/Makefile.am
  36. +++ b/Makefile.am
  37. @@ -104,7 +104,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
  38. MAKEOVERRIDES=
  39. -toolexeclib_LTLIBRARIES = libffi.la
  40. +lib_LTLIBRARIES = libffi.la
  41. noinst_LTLIBRARIES = libffi_convenience.la
  42. libffi_la_SOURCES = src/prep_cif.c src/types.c \
  43. --
  44. 2.5.3