1 From 102c02de867bfe831b5366c89d66bcf170db962e 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
6 The libffi is currently declared as toolexeclib_LTLIBRARIES. In many
7 cases, toolexeclib libraries will be installed in /usr/lib, so it
8 doesn't make any difference.
10 However, with multilib toolchains, they get installed in a
11 subdirectory of /usr/lib/. For example, with a Sourcery CodeBench
12 PowerPC toolchain, if the e500mc multilib variant is used, the libffi
13 library gets installed in /usr/lib/te500mc/. This is due to the
14 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 ;;
22 Once the library is installed in /usr/lib/te500mc/, nothing works
23 because this installation location is inconsistent with the
24 installation location declared in libffi.pc.
26 So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use
27 the more standard lib_LTLIBRARIES, which ensures that the libffi
28 library is always installed in /usr/lib.
30 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
33 1 file changed, 1 insertion(+), 1 deletion(-)
35 diff --git a/Makefile.am b/Makefile.am
36 index 6f669ca..b60bcc1 100644
39 @@ -93,7 +93,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
43 -toolexeclib_LTLIBRARIES = libffi.la
44 +lib_LTLIBRARIES = libffi.la
45 noinst_LTLIBRARIES = libffi_convenience.la
47 libffi_la_SOURCES = src/prep_cif.c src/types.c \