libffi.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-libffi" role="wrap">
  8. <?dbhtml filename="libffi.html"?>
  9. <sect1info condition="script">
  10. <productname>libffi</productname>
  11. <productnumber>&libffi-version;</productnumber>
  12. <address>&libffi-url;</address>
  13. </sect1info>
  14. <title>Libffi-&libffi-version;</title>
  15. <indexterm zone="ch-system-libffi">
  16. <primary sortas="a-libffi">libffi</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Libffi library provides a portable, high level programming
  21. interface to various calling conventions. This allows a programmer to call
  22. any function specified by a call interface description at run time.</para>
  23. <segmentedlist>
  24. <segtitle>&buildtime;</segtitle>
  25. <segtitle>&diskspace;</segtitle>
  26. <seglistitem>
  27. <seg>&libffi-ch6-sbu;</seg>
  28. <seg>&libffi-ch6-du;</seg>
  29. </seglistitem>
  30. </segmentedlist>
  31. </sect2>
  32. <sect2 role="installation">
  33. <title>Installation of Libffi</title>
  34. <para>Modify the Makefile to install headers into the standard
  35. <filename class="directory">/usr/include</filename> directory instead of
  36. <filename class="directory">/usr/lib/libffi-3.2.1/include</filename>.</para>
  37. <screen><userinput remap="pre">sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \
  38. -i include/Makefile.in
  39. sed -e '/^includedir/ s/=.*$/=@includedir@/' \
  40. -e 's/^Cflags: -I${includedir}/Cflags:/' \
  41. -i libffi.pc.in</userinput></screen>
  42. <para>Prepare libffi for compilation:</para>
  43. <screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native</userinput></screen>
  44. <variablelist>
  45. <title>The meaning of the configure option:</title>
  46. <varlistentry>
  47. <term><parameter>--with-gcc-arch=native</parameter></term>
  48. <listitem>
  49. <para>Ensure gcc optimizes for the current system. If this
  50. is not specified, the system is guessed and the code generated
  51. may not be correct for some systems. If the generated code
  52. will be copied from the native system to a less capable
  53. system, use the less capable system as a parameter. For details
  54. about alternative system types, see <ulink
  55. url='https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/x86-Options.html'>
  56. the x86 options in the gcc manual</ulink>.</para>
  57. </listitem>
  58. </varlistentry>
  59. </variablelist>
  60. <para>Compile the package:</para>
  61. <screen><userinput remap="make">make</userinput></screen>
  62. <para>To test the results, issue:</para>
  63. <screen><userinput remap="test">make check</userinput></screen>
  64. <para>Install the package:</para>
  65. <screen><userinput remap="install">make install</userinput></screen>
  66. </sect2>
  67. <sect2 id="contents-libffi" role="content">
  68. <title>Contents of Libffi</title>
  69. <segmentedlist>
  70. <segtitle>Installed library</segtitle>
  71. <seglistitem>
  72. <seg>libffi.so</seg>
  73. </seglistitem>
  74. </segmentedlist>
  75. <variablelist>
  76. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  77. <?dbfo list-presentation="list"?>
  78. <?dbhtml list-presentation="table"?>
  79. <varlistentry id="libffi">
  80. <term><filename class="libraryfile">libffi</filename></term>
  81. <listitem>
  82. <para>contains the libffi API functions.</para>
  83. <indexterm zone="ch-system-libffi">
  84. <primary sortas="c-libffi">libffi</primary>
  85. </indexterm>
  86. </listitem>
  87. </varlistentry>
  88. </variablelist>
  89. </sect2>
  90. </sect1>