source: chapter08/gmp.xml@ 2882861

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

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

  • Property mode set to 100644
File size: 5.5 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>If you are building for 32-bit x86, but you have a CPU which is
46 capable of running 64-bit code <emphasis>and</emphasis> you have specified
47 <envar>CFLAGS</envar> in the environment, the configure script will
48 attempt to configure for 64-bits and fail.
49 Avoid this by invoking the configure command below with
50<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
51 </note>
52-->
53 &update-config-text;
54
55<screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
56
57 <note>
58 <para>The default settings of GMP produce libraries optimized for
59 the host processor. If libraries suitable for processors less
60 capable than the host's CPU are desired, generic libraries can be
61 created by appending the <option>--host=none-linux-gnu</option> option
62 to the <command>configure</command> command.</para>
63
64 <!-- To editors: the configure script says "the none host is obsolete,
65 use - -disable-assembly", but don't believe it: with the latter
66 CFLAGS is still automatically set to -march=something. -->
67 </note>
68
69 <para>Prepare GMP for compilation:</para>
70
71<screen><userinput remap="configure">./configure --prefix=/usr \
72 --enable-cxx \
73 --disable-static \
74 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
75
76 <variablelist>
77 <title>The meaning of the new configure options:</title>
78
79 <varlistentry>
80 <term><parameter>--enable-cxx</parameter></term>
81 <listitem>
82 <para>This parameter enables C++ support</para>
83 </listitem>
84 </varlistentry>
85
86 <varlistentry>
87 <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
88 <listitem>
89 <para>This variable specifies the correct place for the
90 documentation.</para>
91 </listitem>
92 </varlistentry>
93
94 </variablelist>
95
96 <para>Compile the package and generate the HTML documentation:</para>
97
98<screen><userinput remap="make">make
99make html</userinput></screen>
100
101 <important>
102 <para>The test suite for GMP in this section is considered critical.
103 Do not skip it under any circumstances.</para>
104 </important>
105
106 <para>Test the results:</para>
107
108<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
109
110 <caution><para>The code in gmp is highly optimized for the processor where
111 it is built. Occasionally, the code that detects the processor misidentifies
112 the system capabilities and there will be errors in the tests or other
113 applications using the gmp libraries with the message "Illegal
114 instruction". In this case, gmp should be reconfigured with the option
115 <option>--host=none-linux-gnu</option> and rebuilt.</para></caution>
116
117 <para>Ensure that all 199 tests in the test suite passed.
118 Check the results by issuing the following command:</para>
119
120<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
121
122 <para>Install the package and its documentation:</para>
123
124<screen><userinput remap="install">make install
125make install-html</userinput></screen>
126
127 </sect2>
128
129 <sect2 id="contents-gmp" role="content">
130 <title>Contents of GMP</title>
131
132 <segmentedlist>
133 <segtitle>Installed Libraries</segtitle>
134 <segtitle>Installed directory</segtitle>
135
136 <seglistitem>
137 <seg>libgmp.so and libgmpxx.so</seg>
138 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
139 </seglistitem>
140 </segmentedlist>
141
142 <variablelist>
143 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
144 <?dbfo list-presentation="list"?>
145 <?dbhtml list-presentation="table"?>
146
147 <varlistentry id="libgmp">
148 <term><filename class="libraryfile">libgmp</filename></term>
149 <listitem>
150 <para>Contains precision math functions</para>
151 <indexterm zone="ch-system-gmp libgmp">
152 <primary sortas="c-libgmp">libgmp</primary>
153 </indexterm>
154 </listitem>
155 </varlistentry>
156
157 <varlistentry id="libgmpxx">
158 <term><filename class="libraryfile">libgmpxx</filename></term>
159 <listitem>
160 <para>Contains C++ precision math functions</para>
161 <indexterm zone="ch-system-gmp libgmpxx">
162 <primary sortas="c-libgmpxx">libgmpxx</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166 </variablelist>
167
168 </sect2>
169
170</sect1>
Note: See TracBrowser for help on using the repository browser.