Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/gmp.xml

    r0ebda11 r1f28ed12  
    121121  </sect2>
    122122
    123   <!-- - - - - - - - - - -->
    124   <!-- Multilib - 32bit  -->
    125   <!-- - - - - - - - - - -->
    126 
    127   <sect2 arch="ml_32,ml_all" role="installation">
    128     <title>Installation of GMP - 32bit</title>
    129 
    130     <para>Clean previous build:</para>
    131 
    132 <screen><userinput remap="pre">make distclean</userinput></screen>
    133 
    134     <para>Generic libraries can be created by running
    135     the following:</para>
    136 
    137 <screen role="nodump"><userinput remap="pre">cp -v configfsf.guess config.guess
    138 cp -v configfsf.sub   config.sub</userinput></screen>
    139 
    140     <para>Prepare GMP for compilation:</para>
    141 
    142 <screen><userinput remap="configure">ABI="32" \
    143 CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=i686" \
    144 CXXFLAGS="$CFLAGS" \
    145 PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \
    146 ./configure             \
    147     --prefix=/usr       \
    148     --disable-static    \
    149     --enable-cxx        \
    150     --libdir=/usr/lib32 \
    151     --includedir=/usr/include/m32/gmp</userinput></screen>
    152 
    153     <variablelist>
    154       <title>The meaning of the new configure options:</title>
    155 
    156       <varlistentry>
    157         <term><parameter>--includedir=/usr/include/m32/gmp</parameter></term>
    158         <listitem>
    159           <para>Some definitions in gmp.h differs for each arch but
    160           has same name. Therefore, the headers must be separated from
    161           each other.</para>
    162         </listitem>
    163       </varlistentry>
    164 
    165     </variablelist>
    166 
    167     <para>Compile the package:</para>
    168 
    169 <screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
    170 make</userinput></screen>
    171 
    172     <important>
    173       <para>The test suite for GMP in this section is considered critical.
    174       Do not skip it under any circumstances.</para>
    175     </important>
    176 
    177     <para>Test the results:</para>
    178 
    179 <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
    180  
    181     <para>Ensure that all 197 tests in the test suite passed.
    182     Check the results by issuing the following command:</para>
    183 
    184 <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
    185 
    186     <para>Install the package:</para>
    187 
    188 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
    189 cp -Rv DESTDIR/usr/lib32/* /usr/lib32
    190 cp -Rv DESTDIR/usr/include/m32/* /usr/include/m32/
    191 rm -rf DESTDIR</userinput></screen>
    192 
    193   </sect2><!-- m32 -->
    194 
    195   <!-- - - - - - - - - - -->
    196   <!-- Multilib - x32bit -->
    197   <!-- - - - - - - - - - -->
    198 
    199   <sect2 arch="ml_x32,ml_all" role="installation">
    200     <title>Installation of GMP - x32-bit</title>
    201 
    202     <para>Clean previous build:</para>
    203 
    204 <screen><userinput remap="pre">make distclean</userinput></screen>
    205 
    206     <para>Generic libraries can be created by running
    207     the following:</para>
    208 
    209 <screen role="nodump"><userinput remap="pre">cp -v configfsf.guess config.guess
    210 cp -v configfsf.sub   config.sub</userinput></screen>
    211 
    212     <para>Prepare GMP for compilation:</para>
    213 
    214 <screen><userinput remap="configure">ABI="x32" \
    215 CFLAGS="-mx32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=x86-64" \
    216 CXXFLAGS="$CFLAGS" \
    217 PKG_CONFIG_PATH="/usr/libx32/pkgconfig" \
    218 ./configure              \
    219     --prefix=/usr        \
    220     --disable-static     \
    221     --enable-cxx         \
    222     --libdir=/usr/libx32 \
    223     --includedir=/usr/include/mx32/gmp</userinput></screen>
    224 
    225     <para>Compile the package:</para>
    226 
    227 <screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
    228 make</userinput></screen>
    229 
    230     <important>
    231       <para>The test suite for GMP in this section is considered critical.
    232       Do not skip it under any circumstances.</para>
    233     </important>
    234 
    235     <para>Test the results:</para>
    236 
    237 <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
    238  
    239     <para>Ensure that all 197 tests in the test suite passed.
    240     Check the results by issuing the following command:</para>
    241 
    242 <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
    243 
    244     <para>Install the package:</para>
    245 
    246 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
    247 cp -Rv DESTDIR/usr/libx32/* /usr/libx32
    248 cp -Rv DESTDIR/usr/include/mx32/* /usr/include/mx32/
    249 rm -rf DESTDIR</userinput></screen>
    250 
    251   </sect2><!-- mx32 -->
    252 
    253123  <sect2 id="contents-gmp" role="content">
    254124    <title>Contents of GMP</title>
Note: See TracChangeset for help on using the changeset viewer.