source: chapter08/gmp.xml@ d23bc9dd

xry111/mips64el
Last change on this file since d23bc9dd was 60dbbd1, checked in by Xi Ruoyao <xry111@…>, 6 months ago

mips64el: gmp: add ABI=64

  • Property mode set to 100644
File size: 5.9 KB
RevLine 
[7152faa]1<?xml version="1.0" encoding="UTF-8"?>
[6cc0516]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>
[fb386e0]34 <seg>&gmp-fin-sbu;</seg>
35 <seg>&gmp-fin-du;</seg>
[6cc0516]36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of GMP</title>
[60dbbd1]43<!--
[e4eb4cce]44 <note>
[1018fd3]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
[b21778b]50<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
[e4eb4cce]51 </note>
[60dbbd1]52-->
[f63c0c3]53 <note>
54 <para>The default settings of GMP produce libraries optimized for
55 the host processor. If libraries suitable for processors less
[d672ab7]56 capable than the host's CPU are desired, generic libraries can be
[d0de26c]57 created by appending the <option>--host=none-linux-gnu</option> option
58 to the <command>configure</command> command.</para>
[f63c0c3]59
[d0de26c]60 <!-- To editors: the configure script says "the none host is obsolete,
[360fdfca]61 use - -disable-assembly," but don't believe it: with the latter
[d0de26c]62 CFLAGS is still automatically set to -march=something. -->
[f63c0c3]63 </note>
64
[6cc0516]65 <para>Prepare GMP for compilation:</para>
66
[73b2841]67<screen><userinput remap="configure">./configure --prefix=/usr \
68 --enable-cxx \
69 --disable-static \
[60dbbd1]70 ABI=64 \
[c296646]71 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
[6cc0516]72
[0bb67603]73 <variablelist>
[f1994dc]74 <title>The meaning of the new configure options:</title>
[0bb67603]75
76 <varlistentry>
77 <term><parameter>--enable-cxx</parameter></term>
78 <listitem>
79 <para>This parameter enables C++ support</para>
80 </listitem>
[60dbbd1]81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>ABI=64</parameter></term>
85 <listitem>
86 <para>This package defaults to use N32 ABI on 64-bit MIPS systems,
87 but LFS expects 64-bit ABI.</para>
88 </listitem>
[0bb67603]89 </varlistentry>
90
[b06fc9c]91 <varlistentry>
[94ea3c4]92 <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
[b06fc9c]93 <listitem>
94 <para>This variable specifies the correct place for the
95 documentation.</para>
96 </listitem>
97 </varlistentry>
98
[0bb67603]99 </variablelist>
100
[b06fc9c]101 <para>Compile the package and generate the HTML documentation:</para>
[6cc0516]102
[b06fc9c]103<screen><userinput remap="make">make
104make html</userinput></screen>
[6cc0516]105
106 <important>
107 <para>The test suite for GMP in this section is considered critical.
108 Do not skip it under any circumstances.</para>
109 </important>
110
111 <para>Test the results:</para>
112
[10d231d]113<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
[d672ab7]114
[98bed7f]115 <caution><para>The code in gmp is highly optimized for the processor where
[1118b17]116 it is built. Occasionally, the code that detects the processor misidentifies
[98bed7f]117 the system capabilities and there will be errors in the tests or other
[360fdfca]118 applications using the gmp libraries with the message
119 <computeroutput>Illegal instruction</computeroutput>.
120 In this case, gmp should be reconfigured with the option
[d0de26c]121 <option>--host=none-linux-gnu</option> and rebuilt.</para></caution>
[10d231d]122
[d78b550]123 <!-- Some tests PASS on a specific uarch but SKIP on other CPUs.
124 For example on K8 the following command outputs 200. -->
125 <para>Ensure that at least 199 tests in the test suite passed.
[98d78cf]126 Check the results by issuing the following command:</para>
[10d231d]127
[53366411]128<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
[10d231d]129
[b06fc9c]130 <para>Install the package and its documentation:</para>
[e7c8034]131
[b06fc9c]132<screen><userinput remap="install">make install
133make install-html</userinput></screen>
[6cc0516]134
[e7c8034]135 </sect2>
[6cc0516]136
137 <sect2 id="contents-gmp" role="content">
138 <title>Contents of GMP</title>
139
140 <segmentedlist>
[ab31b97]141 <segtitle>Installed libraries</segtitle>
[fe05b08]142 <segtitle>Installed directory</segtitle>
[6cc0516]143
144 <seglistitem>
[040ecb6]145 <seg>libgmp.so and libgmpxx.so</seg>
[fe05b08]146 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
[6cc0516]147 </seglistitem>
148 </segmentedlist>
149
150 <variablelist>
151 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
152 <?dbfo list-presentation="list"?>
153 <?dbhtml list-presentation="table"?>
154
[0bb67603]155 <varlistentry id="libgmp">
[5f7456b]156 <term><filename class="libraryfile">libgmp</filename></term>
[6cc0516]157 <listitem>
[afba93b]158 <para>Contains precision math functions</para>
[0bb67603]159 <indexterm zone="ch-system-gmp libgmp">
160 <primary sortas="c-libgmp">libgmp</primary>
161 </indexterm>
162 </listitem>
163 </varlistentry>
164
165 <varlistentry id="libgmpxx">
[5f7456b]166 <term><filename class="libraryfile">libgmpxx</filename></term>
[0bb67603]167 <listitem>
[afba93b]168 <para>Contains C++ precision math functions</para>
[0bb67603]169 <indexterm zone="ch-system-gmp libgmpxx">
170 <primary sortas="c-libgmpxx">libgmpxx</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
[6cc0516]174 </variablelist>
175
176 </sect2>
177
178</sect1>
Note: See TracBrowser for help on using the repository browser.