56e08f7363421155c97a78db2b52693d4fc3c647
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libffi / 0001-Fix-installation-location-of-libffi.patch
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
5
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.
9
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:
15
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
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.
25
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.
29
30 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
31 ---
32  Makefile.am |    2 +-
33  1 file changed, 1 insertion(+), 1 deletion(-)
34
35 diff --git a/Makefile.am b/Makefile.am
36 index 6f669ca..b60bcc1 100644
37 --- a/Makefile.am
38 +++ b/Makefile.am
39 @@ -93,7 +93,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
40  
41  MAKEOVERRIDES=
42  
43 -toolexeclib_LTLIBRARIES = libffi.la
44 +lib_LTLIBRARIES = libffi.la
45  noinst_LTLIBRARIES = libffi_convenience.la
46  
47  libffi_la_SOURCES = src/prep_cif.c src/types.c \
48 -- 
49 1.7.9.5
50