| 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 |   <title>GMP-&gmp-version;</title>
 | 
|---|
| 12 | 
 | 
|---|
| 13 |   <indexterm zone="ch-system-gmp">
 | 
|---|
| 14 |     <primary sortas="a-GMP">GMP</primary>
 | 
|---|
| 15 |   </indexterm>
 | 
|---|
| 16 | 
 | 
|---|
| 17 |   <sect2 role="package">
 | 
|---|
| 18 |     <title/>
 | 
|---|
| 19 | 
 | 
|---|
| 20 |     <para>GMP is a library for arithmetic on arbitrary precision integers,
 | 
|---|
| 21 |     rational numbers, and floating-point numbers.</para>
 | 
|---|
| 22 | 
 | 
|---|
| 23 |   </sect2>
 | 
|---|
| 24 | 
 | 
|---|
| 25 |   <sect2 role="installation">
 | 
|---|
| 26 |     <title>Installation of GMP</title>
 | 
|---|
| 27 | 
 | 
|---|
| 28 | <!--
 | 
|---|
| 29 |     <para os="p1">The following patch contains a number of updates to the
 | 
|---|
| 30 |     &gmp-version; branch by the GMP developers:</para>
 | 
|---|
| 31 | 
 | 
|---|
| 32 | <screen os="p2"><userinput>patch -Np1 -i ../&gmp-branch_update-patch;</userinput></screen>
 | 
|---|
| 33 | 
 | 
|---|
| 34 | -->
 | 
|---|
| 35 | 
 | 
|---|
| 36 |     <note os="n1">
 | 
|---|
| 37 |       <para>If you are compiling this package on a different CPU then you plan to
 | 
|---|
| 38 |       run the CLFS system on. You must replace GMP's <filename>config.guess</filename>
 | 
|---|
| 39 |       and <filename>config.sub</filename> wrappers with the originals. This will
 | 
|---|
| 40 |       prevent GMP from optimizing for the wrong CPU. You can make this change with
 | 
|---|
| 41 |       the following command:</para>
 | 
|---|
| 42 | 
 | 
|---|
| 43 | <screen><userinput>mv -v config{fsf,}.guess
 | 
|---|
| 44 | mv -v config{fsf,}.sub</userinput></screen>
 | 
|---|
| 45 | 
 | 
|---|
| 46 |     </note>
 | 
|---|
| 47 | 
 | 
|---|
| 48 |     <para os="a">Prepare GMP for compilation:</para>
 | 
|---|
| 49 | 
 | 
|---|
| 50 | <screen os="b"><userinput>CPPFLAGS=-fexceptions CC="gcc -isystem /usr/include" \
 | 
|---|
| 51 | CXX="g++ -isystem /usr/include" \
 | 
|---|
| 52 | LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib" \
 | 
|---|
| 53 |   ./configure --prefix=/usr --enable-cxx --enable-mpbsd</userinput></screen>
 | 
|---|
| 54 | 
 | 
|---|
| 55 |     <para os="c">Compile the package:</para>
 | 
|---|
| 56 | 
 | 
|---|
| 57 | <screen os="d"><userinput>make</userinput></screen>
 | 
|---|
| 58 | 
 | 
|---|
| 59 |     <important os="e">
 | 
|---|
| 60 |       <para>The test suite for GMP is considered
 | 
|---|
| 61 |       critical. Do not skip it under any circumstance.</para>
 | 
|---|
| 62 |     </important>
 | 
|---|
| 63 | 
 | 
|---|
| 64 |     <para os="f">Test the results:</para>
 | 
|---|
| 65 | 
 | 
|---|
| 66 | <screen os="g"><userinput>make check</userinput></screen>
 | 
|---|
| 67 | 
 | 
|---|
| 68 |     <para os="h">Install the package:</para>
 | 
|---|
| 69 | 
 | 
|---|
| 70 | <screen os="i"><userinput>make install</userinput></screen>
 | 
|---|
| 71 | 
 | 
|---|
| 72 |   </sect2>
 | 
|---|
| 73 | 
 | 
|---|
| 74 |   <sect2 id="contents-gmp" role="content">
 | 
|---|
| 75 |     <title>Contents of GMP</title>
 | 
|---|
| 76 | 
 | 
|---|
| 77 |     <segmentedlist>
 | 
|---|
| 78 |       <segtitle>Installed libraries</segtitle>
 | 
|---|
| 79 | 
 | 
|---|
| 80 |       <seglistitem>
 | 
|---|
| 81 |         <seg>libgmp.[a,so], libgmpxx.[a,so], libmp.[a,so]</seg>
 | 
|---|
| 82 |       </seglistitem>
 | 
|---|
| 83 |     </segmentedlist>
 | 
|---|
| 84 | 
 | 
|---|
| 85 |     <variablelist>
 | 
|---|
| 86 |       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
 | 
|---|
| 87 |       <?dbfo list-presentation="list"?>
 | 
|---|
| 88 |       <?dbhtml list-presentation="table"?>
 | 
|---|
| 89 | 
 | 
|---|
| 90 |       <varlistentry id="libgmp">
 | 
|---|
| 91 |         <term><filename class="libraryfile">libgmp</filename></term>
 | 
|---|
| 92 |         <listitem>
 | 
|---|
| 93 |           <para>Contains the definitions for GNU multiple precision functions.</para>
 | 
|---|
| 94 |           <indexterm zone="ch-system-gmp libgmp">
 | 
|---|
| 95 |             <primary sortas="c-libgmp">libgmp</primary>
 | 
|---|
| 96 |           </indexterm>
 | 
|---|
| 97 |         </listitem>
 | 
|---|
| 98 |       </varlistentry>
 | 
|---|
| 99 | 
 | 
|---|
| 100 |       <varlistentry id="libgmpxx">
 | 
|---|
| 101 |         <term><filename class="libraryfile">libgmpxx</filename></term>
 | 
|---|
| 102 |         <listitem>
 | 
|---|
| 103 |           <para>Contains a C++ class wrapper for GMP types.</para>
 | 
|---|
| 104 |           <indexterm zone="ch-system-gmp libgmpxx">
 | 
|---|
| 105 |             <primary sortas="c-libgmpxx">libgmpxx</primary>
 | 
|---|
| 106 |           </indexterm>
 | 
|---|
| 107 |         </listitem>
 | 
|---|
| 108 |       </varlistentry>
 | 
|---|
| 109 | 
 | 
|---|
| 110 |       <varlistentry id="libmp">
 | 
|---|
| 111 |         <term><filename class="libraryfile">libmp</filename></term>
 | 
|---|
| 112 |         <listitem>
 | 
|---|
| 113 |           <para>Contains the Berkeley MP compatibility library.</para>
 | 
|---|
| 114 |           <indexterm zone="ch-system-gmp libmp">
 | 
|---|
| 115 |             <primary sortas="c-libmp">libmp</primary>
 | 
|---|
| 116 |           </indexterm>
 | 
|---|
| 117 |         </listitem>
 | 
|---|
| 118 |       </varlistentry>
 | 
|---|
| 119 | 
 | 
|---|
| 120 |     </variablelist>
 | 
|---|
| 121 | 
 | 
|---|
| 122 |   </sect2>
 | 
|---|
| 123 | 
 | 
|---|
| 124 | </sect1>
 | 
|---|