package/ti-sgx-um: fix Config.in
[buildroot-gz.git] / package / libffi / 0001-Fix-installation-location-of-libffi.patch
blob6ac91237303fc71b06a1f0e070a2075880c63748
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
9 The libffi is currently declared as toolexeclib_LTLIBRARIES. In many
10 cases, toolexeclib libraries will be installed in /usr/lib, so it
11 doesn't make any difference.
13 However, with multilib toolchains, they get installed in a
14 subdirectory of /usr/lib/. For example, with a Sourcery CodeBench
15 PowerPC toolchain, if the e500mc multilib variant is used, the libffi
16 library gets installed in /usr/lib/te500mc/. This is due to the
17 following code in the configure script:
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
25 Once the library is installed in /usr/lib/te500mc/, nothing works
26 because this installation location is inconsistent with the
27 installation location declared in libffi.pc.
29 So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use
30 the more standard lib_LTLIBRARIES, which ensures that the libffi
31 library is always installed in /usr/lib.
33 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
34 [unfuzz for 3.2.1]
35 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
36 ---
37 Makefile.am | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
40 diff --git a/Makefile.am b/Makefile.am
41 index 0e40451..309474c 100644
42 --- a/Makefile.am
43 +++ b/Makefile.am
44 @@ -104,7 +104,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
46 MAKEOVERRIDES=
48 -toolexeclib_LTLIBRARIES = libffi.la
49 +lib_LTLIBRARIES = libffi.la
50 noinst_LTLIBRARIES = libffi_convenience.la
52 libffi_la_SOURCES = src/prep_cif.c src/types.c \
53 --
54 2.5.3