7.20. Libffi-3.4.7

The Libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time.

Approximate build time: 1.7 SBU
Required disk space: 11 MB

7.20.1. Installation of Libffi

First, get the build-host value and set a variable:

case $(uname -m) in
  x86_64)
    chost="x86-64"
  ;;
  *)
    chost="i686"
  ;;
esac

Prepare libffi for compilation:

./configure --prefix=/usr               \
            --disable-static            \
            --disable-exec-static-tramp \
            --with-gcc-arch=${chost}

The meaning of the configure option:

--with-gcc-arch=*

Ensure GCC does not optimize specifically for the current system. If this is not specified, the system is guessed and the code generated may not be correct for some systems.

--disable-exec-static-tramp

Disable static trampoline support. It's a new security feature in libffi, but some BLFS packages (notably GJS) have not been adapted for it.

Compile the package:

make

To test the results, issue:

make check

Install the package:

make install