summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-07-27 05:43:30 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-07-27 05:43:30 +0000
commit17850ef897aba5dbfe7fd6a1a3dd64defcb941f2 (patch)
treefe2c7a41bde93493f46923523b9dbf06545180ad /docs
parentc148e5e48731e8e4f6bd053ff8b15a1c7ee1a3e1 (diff)
downloadexternal_llvm-17850ef897aba5dbfe7fd6a1a3dd64defcb941f2.zip
external_llvm-17850ef897aba5dbfe7fd6a1a3dd64defcb941f2.tar.gz
external_llvm-17850ef897aba5dbfe7fd6a1a3dd64defcb941f2.tar.bz2
Add instructions for building a cross-compiler. Patch contributed by
Anton Korobeynikov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/GettingStarted.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html
index 9f6ef59..6587987 100644
--- a/docs/GettingStarted.html
+++ b/docs/GettingStarted.html
@@ -31,6 +31,7 @@
<li><a href="#installcf">Install the GCC Front End</a>
<li><a href="#config">Local LLVM Configuration</a>
<li><a href="#compile">Compiling the LLVM Suite Source Code</a>
+ <li><a href="#cross-compile">Compiling LLVM As A Cross-Compiler</a>
<li><a href="#objfiles">The Location of LLVM Object Files</a>
<li><a href="#optionalconfig">Optional Configuration Items</a>
</ol></li>
@@ -988,6 +989,46 @@ that directory that is out of date.</p>
<!-- ======================================================================= -->
<div class="doc_subsection">
+ <a name="cross-compile">Compiling LLVM As A Cross-compiler</a>
+</div>
+
+<div class="doc_text">
+ <p>LLVM can be built as a cross-compiler, however some additional steps are
+ required.<sup><a href="#ccn_1">1</a></sup> To build a cross-compiler, use
+ these instructions:</p>
+ <ol>
+ <li>Configure and build LLVM Suite as a native compiler. You will need
+ just <tt>TableGen</tt> from that build.
+ <ul>
+ <li>If you have <tt>$LLVM_OBJ_ROOT=$LLVM_SRC_ROOT</tt> just execute
+ <tt>make -C utils/TableGen</tt> after configuring.</li>
+ <li>Otherwise you will need to monitor building process and terminate
+ it just after <tt>TableGen</tt> was built.</li>
+ </ul>
+ </li>
+ <li>Copy the TableGen binary to somewhere safe (out of your build tree).
+ </li>
+ <li>Configure LLVM to build as a cross-compiler. To do this, supply the
+ configure script with <tt>--build</tt> and <tt>--host</tt> options that
+ are different. The values of these options must be legal target triples and
+ should specify a processor for which LLVM supports code generation.</li>
+ <li>Put the saved <tt>TableGen</tt> executable into the
+ into <tt>$LLVM_OBJ_ROOT/{BUILD_TYPE}/bin</tt> directory (e.g. into
+ <tt>.../Release/bin</tt> for a Release build).</li>
+ <li>Build LLVM as usual.</li>
+ </ol>
+ <p><b>Notes:</b></p>
+ <div class="doc_notes">
+ <ol>
+ <li><a name="ccn_1">Cross-compiling</a> was tested only with Linux as
+ build platform and Windows as host using mingw32 cross-compiler. Other
+ combinations have not been tested.</li>
+ </ol>
+ </div>
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
<a name="objfiles">The Location of LLVM Object Files</a>
</div>