libffi.xml 4.2 KB

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