From 17850ef897aba5dbfe7fd6a1a3dd64defcb941f2 Mon Sep 17 00:00:00 2001
From: Reid Spencer
Date: Thu, 27 Jul 2006 05:43:30 +0000
Subject: [PATCH] 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
---
docs/GettingStarted.html | 41 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html
index 9f6ef59b7fd..6587987060a 100644
--- a/docs/GettingStarted.html
+++ b/docs/GettingStarted.html
@@ -31,6 +31,7 @@
Install the GCC Front End
Local LLVM Configuration
Compiling the LLVM Suite Source Code
+ Compiling LLVM As A Cross-Compiler
The Location of LLVM Object Files
Optional Configuration Items
@@ -986,6 +987,46 @@ that directory that is out of date.
+
+
+
LLVM can be built as a cross-compiler, however some additional steps are
+ required.1 To build a cross-compiler, use
+ these instructions:
+
+ - Configure and build LLVM Suite as a native compiler. You will need
+ just TableGen from that build.
+
+ - If you have $LLVM_OBJ_ROOT=$LLVM_SRC_ROOT just execute
+ make -C utils/TableGen after configuring.
+ - Otherwise you will need to monitor building process and terminate
+ it just after TableGen was built.
+
+
+ - Copy the TableGen binary to somewhere safe (out of your build tree).
+
+ - Configure LLVM to build as a cross-compiler. To do this, supply the
+ configure script with --build and --host 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.
+ - Put the saved TableGen executable into the
+ into $LLVM_OBJ_ROOT/{BUILD_TYPE}/bin directory (e.g. into
+ .../Release/bin for a Release build).
+ - Build LLVM as usual.
+
+
Notes:
+
+
+ - Cross-compiling was tested only with Linux as
+ build platform and Windows as host using mingw32 cross-compiler. Other
+ combinations have not been tested.
+
+
+
+