Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2007-12-01 12:56:48


Author: vladimir_prus
Date: 2007-12-01 12:56:47 EST (Sat, 01 Dec 2007)
New Revision: 41538
URL: http://svn.boost.org/trac/boost/changeset/41538

Log:
Document 64-bit compilation.

Text files modified:
   trunk/tools/build/v2/doc/src/reference.xml | 123 +++++++++++++++++++++++++++++++++++++++
   1 files changed, 121 insertions(+), 2 deletions(-)

Modified: trunk/tools/build/v2/doc/src/reference.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/reference.xml (original)
+++ trunk/tools/build/v2/doc/src/reference.xml 2007-12-01 12:56:47 EST (Sat, 01 Dec 2007)
@@ -678,9 +678,50 @@
           release variant with debugging information.</para>
         </listitem>
       </varlistentry>
-
 
+ <varlistentry><term><literal>architecture</literal></term>
+ <listitem>
+
+ <para>The <literal>architecture</literal> features specifies
+ the general processor familty to generate code for.</para>
+
+ </listitem>
+ </varlistentry>
 
+ <varlistentry><term><literal>instruction-set</literal></term>
+ <indexterm><primary>instruction-set</primary></indexterm>
+ <listitem>
+ <para>Allowed values for this feature depend on used toolset.</para>
+
+ <para>The <literal>instruction-set</literal> specifies for which
+ specific instruction set the code should be generated. The
+ code in general might not run on processors with older/different
+ instruction sets.</para>
+
+ <para>While Boost.Build allows a large set of possible values
+ for this features, whether a given value works depends on which
+ compiler you use. Please see
+ <xref linkend="bbv2.reference.tools.compilers"/> for details.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term><literal>address-model</literal></term>
+ <indexterm><primary>64-bit compilation</primary></indexterm>
+ <listitem>
+ <para><emphasis role="bold">Allowed values:</emphasis> <literal>32</literal>, <literal>64</literal>.</para>
+
+ <para>The <literal>address-model</literal> specifies if 32-bit or
+ 64-bit code should be generated by the compiler. Whether this feature
+ works depends on the used compiler, it's version, how the compiler
+ is configured, and the values of the <literal>architecture</literal>
+ <literal>instruction-set</literal>
+ features. Please see <xref linkend="bbv2.reference.tools.compilers"/>
+ for details.</para>
+ </listitem>
+ </varlistentry>
+
     </variablelist>
   </section>
 
@@ -770,6 +811,15 @@
             
           </variablelist>
 
+ <indexterm><primary>64-bit compilation</primary>
+ <secondary>gcc</secondary></indexterm>
+
+ In order to compile 64-bit applications, you have to specify
+ <code>address-model=64</code>, and the <code>instruction-set</code>
+ feature should refer to a 64 bit processor. Currently, those
+ include <literal>nocona</literal>, <literal>opteron</literal>,
+ <literal>athlon64</literal> and <literal>athlon-fx</literal>.
+
         </section>
 
 
@@ -887,6 +937,70 @@
 
 
           </variablelist>
+
+ <section>
+ <title>64-bit support</title>
+
+ <indexterm><primary>64-bit compilation</primary>
+ <secondary>Microsoft Visual Studio</secondary></indexterm>
+
+ <para>Starting with version 8.0, Microsoft Visual Studio
+ can generate binaries for 64-bit processor, both 64-bit
+ flavours of x86 (codenamed AMD64/EM64T), and
+ Itanium (codenamed IA64). In addition, compilers that are
+ itself run in 64-bit mode, for better performance, are provided.
+ The complete list of compiler configurations are as follows
+ (we abbreviate AMD64/EM64T to just AMD64):</para>
+ <itemizedlist>
+ <listitem><para>32-bit x86 host, 32-bit x86 target</para>
+ </listitem>
+ <listitem><para>32-bit x86 host, 64-bit AMD64 target</para>
+ </listitem>
+ <listitem><para>32-bit x86 host, 64-bit IA64 target</para>
+ </listitem>
+ <listitem><para>64-bit AMD64 host, 64-bit AMD64 target</para>
+ </listitem>
+ <listitem><para>64-bit IA64 host, 64-bit IA64 target</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The 32-bit host compilers can be always used, even on 64-bit Windows.
+ On the contrary, 64-bit host compilers require both 64-bit
+ host processor and 64-bit Windows, but can be faster. By default,
+ only 32-bit host, 32-bit target compiler is installed, and additional
+ compilers should be installed explicitly.
+ </para>
+
+ <para>To use 64-bit compilation you should:</para>
+ <orderedlist>
+ <listitem><para>Configure you compiler as usual. If you provide
+ a path to the compiler explicitly, provide the path to the
+ 32-bit compiler. If you try to specify the path to any of 64-bit
+ compilers, configuration won't work.</para>
+ </listitem>
+
+ <listitem><para>When compiling, use <code>address-model=64</code>,
+ to generate AMD64 code.</para></listitem>
+
+ <listitem><para>To generate IA64 code, use
+ <code>architecture=ia64</code></para></listitem>
+ </orderedlist>
+
+ <para>The (AMD64 host, AMD64 target) compiler will be used
+ automatically when you're generating AMD64 code and are
+ running 64-bit Windows on AMD64. The (IA64 host, IA64 target)
+ compiler won't be ever used, since nobody has an IA64 machine
+ to test.</para>
+
+ <para>It is believed that AMD64 and EM64T targets are essentially
+ compatible. The compiler options <code>/favor:AMD64</code>
+ and <code>/favor:EM64T</code>, which are accepted only by
+ AMD64 targeting compilers, cause the generated code to be
+ tuned to a specific flavor of 64-bit x86. Boost.Build will
+ make use of those options depending on the value
+ of the<code>instruction-set</code> feature.</para>
+
+ </section>
                  
         </section>
 
@@ -1183,7 +1297,12 @@
             <xi:include href="fragments.xml#xpointer(id('common_options')/*)"
                         parse="xml"/>
           </variablelist>
-
+
+ <indexterm><primary>64-bit compilation</primary>
+ <secondary>Sun Studio</secondary></indexterm>
+ Starting with Sun Studio 12, you can create 64-bit applications
+ by using the <code>address-model=64</code> property.
+
         </section>
 
         <section id="bbv2.reference.tools.compiler.vacpp">


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk