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