This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix installation localtion of libffi


On Thu, Feb 7, 2013 at 5:19 PM, Matthias Klose <doko@ubuntu.com> wrote:
> Am 07.02.2013 22:40, schrieb Jakub Jelinek:
>> On Thu, Feb 07, 2013 at 10:31:31PM +0100, Thomas Petazzoni wrote:
>>>   multi_os_directory=`$CC -print-multi-os-directory`
>>>   case $multi_os_directory in
>>>     .) ;; # Avoid trailing /.
>>>     *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
>>>   esac
>>>
>>> Once the library is installed in /usr/lib/te500mc/, nothing works
>>> because this installation location is inconsistent with the
>>> installation location declared in libffi.pc.
>>>
>>> So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use
>>> the more standard lib_LTLIBRARIES, which ensures that the libffi
>>> library is always installed in /usr/lib.
>>
>> There is nothing bizzare on it, of course you want to install say
>> on x86_64 the 64-bit library into /usr/lib64/ directory where the dynamic
>> linker will find it, not into /usr/lib/ where it is looking for 32-bit
>> libraries, etc.
>> So this change is wrong.
>
> It looks odd for the standalone libffi release, and only works for multilib
> configurations, when MULTILIB_OSDIRNAMES is defined too.  There are multilib
> configurations where $CC -print-multi-os-directory isn't `.' for the default.
>
> I didn't check, but maybe something like this is wanted?
>
>    case $multi_os_directory in
>      .) ;; # Avoid trailing /.
>      ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
>    esac

This looks reasonable.  A ticket was recently filed on this...

https://github.com/atgreen/libffi/issues/31

...and I've rolled your solution into
ftp://sourceware.org/pub/libffi/libffi-3.0.13-rc2.tar.gz for testing.

Thanks!

AG


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]