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