source: chapter08/gmp.xml@ 328eb6f

xry111/arm64
Last change on this file since 328eb6f was 328eb6f, checked in by Xi Ruoyao <xry111@…>, 7 months ago

Merge remote-tracking branch 'origin/trunk' into xry111/arm64

  • Property mode set to 100644
File size: 5.1 KB
RevLine 
[7152faa]1<?xml version="1.0" encoding="UTF-8"?>
[6cc0516]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
8<sect1 id="ch-system-gmp" role="wrap">
9 <?dbhtml filename="gmp.html"?>
10
11 <sect1info condition="script">
12 <productname>gmp</productname>
13 <productnumber>&gmp-version;</productnumber>
14 <address>&gmp-url;</address>
15 </sect1info>
16
17 <title>GMP-&gmp-version;</title>
18
19 <indexterm zone="ch-system-gmp">
20 <primary sortas="a-GMP">GMP</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The GMP package contains math libraries. These have useful functions
27 for arbitrary precision arithmetic.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
[fb386e0]34 <seg>&gmp-fin-sbu;</seg>
35 <seg>&gmp-fin-du;</seg>
[6cc0516]36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of GMP</title>
43
[f63c0c3]44 <note>
45 <para>The default settings of GMP produce libraries optimized for
46 the host processor. If libraries suitable for processors less
[d672ab7]47 capable than the host's CPU are desired, generic libraries can be
[d0de26c]48 created by appending the <option>--host=none-linux-gnu</option> option
49 to the <command>configure</command> command.</para>
[f63c0c3]50
[d0de26c]51 <!-- To editors: the configure script says "the none host is obsolete,
[360fdfca]52 use - -disable-assembly," but don't believe it: with the latter
[d0de26c]53 CFLAGS is still automatically set to -march=something. -->
[f63c0c3]54 </note>
55
[6cc0516]56 <para>Prepare GMP for compilation:</para>
57
[73b2841]58<screen><userinput remap="configure">./configure --prefix=/usr \
59 --enable-cxx \
60 --disable-static \
[c296646]61 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
[6cc0516]62
[0bb67603]63 <variablelist>
[f1994dc]64 <title>The meaning of the new configure options:</title>
[0bb67603]65
66 <varlistentry>
67 <term><parameter>--enable-cxx</parameter></term>
68 <listitem>
69 <para>This parameter enables C++ support</para>
70 </listitem>
71 </varlistentry>
72
[b06fc9c]73 <varlistentry>
[94ea3c4]74 <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
[b06fc9c]75 <listitem>
76 <para>This variable specifies the correct place for the
77 documentation.</para>
78 </listitem>
79 </varlistentry>
80
[0bb67603]81 </variablelist>
82
[b06fc9c]83 <para>Compile the package and generate the HTML documentation:</para>
[6cc0516]84
[b06fc9c]85<screen><userinput remap="make">make
86make html</userinput></screen>
[6cc0516]87
88 <important>
89 <para>The test suite for GMP in this section is considered critical.
90 Do not skip it under any circumstances.</para>
91 </important>
92
93 <para>Test the results:</para>
94
[10d231d]95<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
[d672ab7]96
[98bed7f]97 <caution><para>The code in gmp is highly optimized for the processor where
[1118b17]98 it is built. Occasionally, the code that detects the processor misidentifies
[98bed7f]99 the system capabilities and there will be errors in the tests or other
[360fdfca]100 applications using the gmp libraries with the message
101 <computeroutput>Illegal instruction</computeroutput>.
102 In this case, gmp should be reconfigured with the option
[d0de26c]103 <option>--host=none-linux-gnu</option> and rebuilt.</para></caution>
[10d231d]104
[d78b550]105 <!-- Some tests PASS on a specific uarch but SKIP on other CPUs.
106 For example on K8 the following command outputs 200. -->
107 <para>Ensure that at least 199 tests in the test suite passed.
[98d78cf]108 Check the results by issuing the following command:</para>
[10d231d]109
[53366411]110<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
[10d231d]111
[b06fc9c]112 <para>Install the package and its documentation:</para>
[e7c8034]113
[b06fc9c]114<screen><userinput remap="install">make install
115make install-html</userinput></screen>
[6cc0516]116
[e7c8034]117 </sect2>
[6cc0516]118
119 <sect2 id="contents-gmp" role="content">
120 <title>Contents of GMP</title>
121
122 <segmentedlist>
[ab31b97]123 <segtitle>Installed libraries</segtitle>
[fe05b08]124 <segtitle>Installed directory</segtitle>
[6cc0516]125
126 <seglistitem>
[040ecb6]127 <seg>libgmp.so and libgmpxx.so</seg>
[fe05b08]128 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
[6cc0516]129 </seglistitem>
130 </segmentedlist>
131
132 <variablelist>
133 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
134 <?dbfo list-presentation="list"?>
135 <?dbhtml list-presentation="table"?>
136
[0bb67603]137 <varlistentry id="libgmp">
[5f7456b]138 <term><filename class="libraryfile">libgmp</filename></term>
[6cc0516]139 <listitem>
[afba93b]140 <para>Contains precision math functions</para>
[0bb67603]141 <indexterm zone="ch-system-gmp libgmp">
142 <primary sortas="c-libgmp">libgmp</primary>
143 </indexterm>
144 </listitem>
145 </varlistentry>
146
147 <varlistentry id="libgmpxx">
[5f7456b]148 <term><filename class="libraryfile">libgmpxx</filename></term>
[0bb67603]149 <listitem>
[afba93b]150 <para>Contains C++ precision math functions</para>
[0bb67603]151 <indexterm zone="ch-system-gmp libgmpxx">
152 <primary sortas="c-libgmpxx">libgmpxx</primary>
153 </indexterm>
154 </listitem>
155 </varlistentry>
[6cc0516]156 </variablelist>
157
158 </sect2>
159
160</sect1>
Note: See TracBrowser for help on using the repository browser.