libffi.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. <note>
  35. <para>Similar to GMP, libffi builds with optimizations specific
  36. to the proccesor in use. If building for another system, export
  37. CFLAGS and CXXFLAGS to specify a generic build for your architecture.
  38. If this is not done, all applications that link to libffi will trigger
  39. Illegal Operation Errors.</para>
  40. </note>
  41. <para>Modify the Makefile to install headers into the standard
  42. <filename class="directory">/usr/include</filename> directory instead of
  43. <filename class="directory">/usr/lib/libffi-&libffi-version;/include</filename>.</para>
  44. <screen><userinput remap="pre">sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \
  45. -i include/Makefile.in
  46. sed -e '/^includedir/ s/=.*$/=@includedir@/' \
  47. -e 's/^Cflags: -I${includedir}/Cflags:/' \
  48. -i libffi.pc.in</userinput></screen>
  49. <para>Prepare libffi for compilation:</para>
  50. <screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native</userinput></screen>
  51. <variablelist>
  52. <title>The meaning of the configure option:</title>
  53. <varlistentry>
  54. <term><parameter>--with-gcc-arch=native</parameter></term>
  55. <listitem>
  56. <para>Ensure gcc optimizes for the current system. If this
  57. is not specified, the system is guessed and the code generated
  58. may not be correct for some systems. If the generated code
  59. will be copied from the native system to a less capable
  60. system, use the less capable system as a parameter. For details
  61. about alternative system types, see <ulink
  62. url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
  63. the x86 options in the gcc manual</ulink>.</para>
  64. </listitem>
  65. </varlistentry>
  66. </variablelist>
  67. <para>Compile the package:</para>
  68. <screen><userinput remap="make">make</userinput></screen>
  69. <para>To test the results, issue:</para>
  70. <screen><userinput remap="test">make check</userinput></screen>
  71. <para>Install the package:</para>
  72. <screen><userinput remap="install">make install</userinput></screen>
  73. </sect2>
  74. <sect2 id="contents-libffi" role="content">
  75. <title>Contents of Libffi</title>
  76. <segmentedlist>
  77. <segtitle>Installed library</segtitle>
  78. <seglistitem>
  79. <seg>libffi.so</seg>
  80. </seglistitem>
  81. </segmentedlist>
  82. <variablelist>
  83. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  84. <?dbfo list-presentation="list"?>
  85. <?dbhtml list-presentation="table"?>
  86. <varlistentry id="libffi">
  87. <term><filename class="libraryfile">libffi</filename></term>
  88. <listitem>
  89. <para>contains the libffi API functions.</para>
  90. <indexterm zone="ch-system-libffi">
  91. <primary sortas="c-libffi">libffi</primary>
  92. </indexterm>
  93. </listitem>
  94. </varlistentry>
  95. </variablelist>
  96. </sect2>
  97. </sect1>