source: chapter06/gmp.xml@ 0efb8e1

multilib-10.1
Last change on this file since 0efb8e1 was 0efb8e1, checked in by Thomas Trepl <thomas@…>, 4 years ago

MultiLib: Merge changes from trunk

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11783 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 8.3 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-ch6-sbu;</seg>
35 <seg>&gmp-ch6-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 running the following:
58
59<screen role="nodump"><userinput>cp -v configfsf.guess config.guess
60cp -v configfsf.sub config.sub</userinput></screen></para>
61 </note>
62
63 <para>Prepare GMP for compilation:</para>
64
65<screen><userinput remap="configure">./configure --prefix=/usr \
66 --enable-cxx \
67 --disable-static \
68 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
69
70 <variablelist>
71 <title>The meaning of the new configure options:</title>
72
73 <varlistentry>
74 <term><parameter>--enable-cxx</parameter></term>
75 <listitem>
76 <para>This parameter enables C++ support</para>
77 </listitem>
78 </varlistentry>
79
80 <varlistentry>
81 <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
82 <listitem>
83 <para>This variable specifies the correct place for the
84 documentation.</para>
85 </listitem>
86 </varlistentry>
87
88 </variablelist>
89
90 <para>Compile the package and generate the HTML documentation:</para>
91
92<screen><userinput remap="make">make
93make html</userinput></screen>
94
95 <important>
96 <para>The test suite for GMP in this section is considered critical.
97 Do not skip it under any circumstances.</para>
98 </important>
99
100 <para>Test the results:</para>
101
102<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
103
104 <caution><para>The code in gmp is highly optimized for the processor where
105 it is built. Occasionally, the code that detects the processor misidentifies
106 the system capabilities and there will be errors in the tests or other
107 applications using the gmp libraries with the message "Illegal
108 instruction". In this case, gmp should be reconfigured with the option
109 --build=x86_64-unknown-linux-gnu and rebuilt.</para></caution>
110
111 <para>Ensure that all 197 tests in the test suite passed.
112 Check the results by issuing the following command:</para>
113
114<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
115
116 <para>Install the package and its documentation:</para>
117
118<screen><userinput remap="install">make install
119make install-html</userinput></screen>
120
121 </sect2>
122
123 <!-- ~~~~~ m32 ~~~~~ -->
124 <sect2 arch="ml_32,ml_all" role="installation">
125 <title>Installation of GMP - 32-bit</title>
126
127 <para>Clean previous build:</para>
128
129<screen><userinput remap="pre">make distclean</userinput></screen>
130
131 <para>Generic libraries can be created by running
132 the following:</para>
133
134<screen><userinput>cp -v configfsf.guess config.guess
135cp -v configfsf.sub config.sub</userinput></screen>
136
137 <para>Prepare GMP for compilation:</para>
138
139<screen><userinput remap="configure">ABI="32" \
140CC="gcc -m32" \
141CXX="g++ -m32" \
142./configure \
143 --prefix=/usr \
144 --disable-static \
145 --enable-cxx \
146 --libdir=/usr/lib32 \
147 --host=i686-pc-linux-gnu</userinput></screen>
148
149 <para>Compile the package:</para>
150
151<screen><userinput remap="make">make</userinput></screen>
152
153 <important>
154 <para>The test suite for GMP in this section is considered critical.
155 Do not skip it under any circumstances.</para>
156 </important>
157
158 <para>Test the results:</para>
159
160<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
161
162 <para>Ensure that all 190 tests in the test suite passed.
163 Check the results by issuing the following command:</para>
164
165<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
166
167 <para>Install the package:</para>
168
169<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
170cp -Rv DESTDIR/usr/lib32/* /usr/lib32
171rm -rf DESTDIR</userinput></screen>
172
173 </sect2>
174
175 <!-- ~~~~~ mx32 ~~~~~ -->
176 <sect2 arch="ml_x32,ml_all" role="installation">
177 <title>Installation of GMP - x32-bit</title>
178
179 <para>Clean previous build:</para>
180
181<screen><userinput remap="pre">make distclean</userinput></screen>
182
183 <para>Generic libraries can be created by running
184 the following:</para>
185
186<screen><userinput>cp -v configfsf.guess config.guess
187cp -v configfsf.sub config.sub</userinput></screen>
188
189 <para>Prepare GMP for compilation:</para>
190
191<screen><userinput remap="configure">ABI="x32" \
192CC="gcc -mx32" \
193CXX="g++ -mx32" \
194./configure \
195 --prefix=/usr \
196 --disable-static \
197 --enable-cxx \
198 --libdir=/usr/libx32 \
199 --host=x86_64-pc-linux-gnux32</userinput></screen>
200
201 <para>Compile the package:</para>
202
203<screen><userinput remap="make">make</userinput></screen>
204
205 <important>
206 <para>The test suite for GMP in this section is considered critical.
207 Do not skip it under any circumstances.</para>
208 </important>
209
210 <para>Test the results:</para>
211
212<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
213
214 <para>Ensure that all 190 tests in the test suite passed.
215 Check the results by issuing the following command:</para>
216
217<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
218
219 <para>Install the package:</para>
220
221<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
222cp -Rv DESTDIR/usr/libx32/* /usr/libx32
223rm -rf DESTDIR</userinput></screen>
224
225 </sect2>
226
227 <sect2 id="contents-gmp" role="content">
228 <title>Contents of GMP</title>
229
230 <segmentedlist>
231 <segtitle>Installed Libraries</segtitle>
232 <segtitle>Installed directory</segtitle>
233
234 <seglistitem>
235 <seg>libgmp.so and libgmpxx.so</seg>
236 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
237 </seglistitem>
238 </segmentedlist>
239
240 <variablelist>
241 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
242 <?dbfo list-presentation="list"?>
243 <?dbhtml list-presentation="table"?>
244
245 <varlistentry id="libgmp">
246 <term><filename class="libraryfile">libgmp</filename></term>
247 <listitem>
248 <para>Contains precision math functions</para>
249 <indexterm zone="ch-system-gmp libgmp">
250 <primary sortas="c-libgmp">libgmp</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="libgmpxx">
256 <term><filename class="libraryfile">libgmpxx</filename></term>
257 <listitem>
258 <para>Contains C++ precision math functions</para>
259 <indexterm zone="ch-system-gmp libgmpxx">
260 <primary sortas="c-libgmpxx">libgmpxx</primary>
261 </indexterm>
262 </listitem>
263 </varlistentry>
264 </variablelist>
265
266 </sect2>
267
268</sect1>
Note: See TracBrowser for help on using the repository browser.