source: chapter08/gmp.xml@ 64e8131

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

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

  • Property mode set to 100644
File size: 5.0 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 <para>Ensure that all 199 tests in the test suite passed.
105 Check the results by issuing the following command:</para>
106
107<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
108
109 <para>Install the package and its documentation:</para>
110
111<screen><userinput remap="install">make install
112make install-html</userinput></screen>
113
114 </sect2>
115
116 <sect2 id="contents-gmp" role="content">
117 <title>Contents of GMP</title>
118
119 <segmentedlist>
120 <segtitle>Installed Libraries</segtitle>
121 <segtitle>Installed directory</segtitle>
122
123 <seglistitem>
124 <seg>libgmp.so and libgmpxx.so</seg>
125 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
126 </seglistitem>
127 </segmentedlist>
128
129 <variablelist>
130 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
131 <?dbfo list-presentation="list"?>
132 <?dbhtml list-presentation="table"?>
133
134 <varlistentry id="libgmp">
135 <term><filename class="libraryfile">libgmp</filename></term>
136 <listitem>
137 <para>Contains precision math functions</para>
138 <indexterm zone="ch-system-gmp libgmp">
139 <primary sortas="c-libgmp">libgmp</primary>
140 </indexterm>
141 </listitem>
142 </varlistentry>
143
144 <varlistentry id="libgmpxx">
145 <term><filename class="libraryfile">libgmpxx</filename></term>
146 <listitem>
147 <para>Contains C++ precision math functions</para>
148 <indexterm zone="ch-system-gmp libgmpxx">
149 <primary sortas="c-libgmpxx">libgmpxx</primary>
150 </indexterm>
151 </listitem>
152 </varlistentry>
153 </variablelist>
154
155 </sect2>
156
157</sect1>
Note: See TracBrowser for help on using the repository browser.