Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/gmp.xml

    r1f28ed12 rceebda5  
    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
     138cp -v configfsf.sub   config.sub</userinput></screen>
     139
     140    <para>Prepare GMP for compilation:</para>
     141
     142<screen><userinput remap="configure">ABI="32" \
     143CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=i686" \
     144CXXFLAGS="$CFLAGS" \
     145PKG_CONFIG_PATH="&usr-lib-m32;/pkgconfig" \
     146./configure             \
     147    --prefix=/usr       \
     148    --disable-static    \
     149    --enable-cxx        \
     150    --libdir=&usr-lib-m32; \
     151    --includedir=&usr-inc-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-inc-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
     170make</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
     189cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
     190cp -Rv DESTDIR&usr-inc-m32;/* &usr-inc-m32;/
     191rm -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
     210cp -v configfsf.sub   config.sub</userinput></screen>
     211
     212    <para>Prepare GMP for compilation:</para>
     213
     214<screen><userinput remap="configure">ABI="x32" \
     215CFLAGS="-mx32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=x86-64" \
     216CXXFLAGS="$CFLAGS" \
     217PKG_CONFIG_PATH="&usr-lib-mx32;/pkgconfig" \
     218./configure              \
     219    --prefix=/usr        \
     220    --disable-static     \
     221    --enable-cxx         \
     222    --libdir=&usr-lib-mx32; \
     223    --includedir=&usr-inc-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
     228make</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
     247cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
     248cp -Rv DESTDIR&usr-inc-mx32;/* &usr-inc-mx32;/
     249rm -rf DESTDIR</userinput></screen>
     250
     251  </sect2><!-- mx32 -->
     252
    123253  <sect2 id="contents-gmp" role="content">
    124254    <title>Contents of GMP</title>
Note: See TracChangeset for help on using the changeset viewer.