source: chapter08/gmp.xml@ 5342a69

xry111/arm64 xry111/arm64-12.0
Last change on this file since 5342a69 was 5342a69, checked in by Xi Ruoyao <xry111@…>, 10 months ago

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

  • Property mode set to 100644
File size: 5.1 KB
Line 
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
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>
34 <seg>&gmp-fin-sbu;</seg>
35 <seg>&gmp-fin-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of GMP</title>
43
44 <note>
45 <para>The default settings of GMP produce libraries optimized for
46 the host processor. If libraries suitable for processors less
47 capable than the host's CPU are desired, generic libraries can be
48 created by appending the <option>--host=none-linux-gnu</option> option
49 to the <command>configure</command> command.</para>
50
51 <!-- To editors: the configure script says "the none host is obsolete,
52 use - -disable-assembly", but don't believe it: with the latter
53 CFLAGS is still automatically set to -march=something. -->
54 </note>
55
56 <para>Prepare GMP for compilation:</para>
57
58<screen><userinput remap="configure">./configure --prefix=/usr \
59 --enable-cxx \
60 --disable-static \
61 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
62
63 <variablelist>
64 <title>The meaning of the new configure options:</title>
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
73 <varlistentry>
74 <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
75 <listitem>
76 <para>This variable specifies the correct place for the
77 documentation.</para>
78 </listitem>
79 </varlistentry>
80
81 </variablelist>
82
83 <para>Compile the package and generate the HTML documentation:</para>
84
85<screen><userinput remap="make">make
86make html</userinput></screen>
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
95<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
96
97 <caution><para>The code in gmp is highly optimized for the processor where
98 it is built. Occasionally, the code that detects the processor misidentifies
99 the system capabilities and there will be errors in the tests or other
100 applications using the gmp libraries with the message "Illegal
101 instruction". In this case, gmp should be reconfigured with the option
102 <option>--host=none-linux-gnu</option> and rebuilt.</para></caution>
103
104 <!-- Some tests PASS on a specific uarch but SKIP on other CPUs.
105 For example on K8 the following command outputs 200. -->
106 <para>Ensure that at least 199 tests in the test suite passed.
107 Check the results by issuing the following command:</para>
108
109<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
110
111 <para>Install the package and its documentation:</para>
112
113<screen><userinput remap="install">make install
114make install-html</userinput></screen>
115
116 </sect2>
117
118 <sect2 id="contents-gmp" role="content">
119 <title>Contents of GMP</title>
120
121 <segmentedlist>
122 <segtitle>Installed Libraries</segtitle>
123 <segtitle>Installed directory</segtitle>
124
125 <seglistitem>
126 <seg>libgmp.so and libgmpxx.so</seg>
127 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
128 </seglistitem>
129 </segmentedlist>
130
131 <variablelist>
132 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
133 <?dbfo list-presentation="list"?>
134 <?dbhtml list-presentation="table"?>
135
136 <varlistentry id="libgmp">
137 <term><filename class="libraryfile">libgmp</filename></term>
138 <listitem>
139 <para>Contains precision math functions</para>
140 <indexterm zone="ch-system-gmp libgmp">
141 <primary sortas="c-libgmp">libgmp</primary>
142 </indexterm>
143 </listitem>
144 </varlistentry>
145
146 <varlistentry id="libgmpxx">
147 <term><filename class="libraryfile">libgmpxx</filename></term>
148 <listitem>
149 <para>Contains C++ precision math functions</para>
150 <indexterm zone="ch-system-gmp libgmpxx">
151 <primary sortas="c-libgmpxx">libgmpxx</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155 </variablelist>
156
157 </sect2>
158
159</sect1>
Note: See TracBrowser for help on using the repository browser.