source: chapter08/gmp.xml@ 010577c

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

loongarch: Revert "gmp: Update config.{guess,sub}"

This reverts commit dd34ffcce0e54b31fa26d11081dd82c6c333f14a.

It's not needed with GMP 6.3.0.

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