Bootstrapping the LLVM C/C++ Front-End
</div>
-<p>This document is intended to explain the process of building the LLVM
-C/C++ front-end, based on GCC 3.4, from source.</p>
+<ol>
+ <li><a href="#cautionarynote">A Cautionary Note</a>
+ <li><a href="#instructions">Instructions</a>
+</ol>
+
+<div class="doc_text">
+ <p><b>Written by Brian R. Gaeke</b></p>
+</div>
+
+<!-- *********************************************************************** -->
+<div class="doc_section">
+ <a name="cautionarynote">A Cautionary Note</a>
+</div>
+<!-- *********************************************************************** -->
+
+<div class="doc_text">
+<p>This document is intended to explain the process of building the
+LLVM C/C++ front-end, based on GCC 3.4, from its source code. You
+would have to do this, for example, if you are porting LLVM to a new
+architecture or operating system.</p>
<p><b>NOTE:</b> This is currently a somewhat fragile, error-prone
process, and you should <b>only</b> try to do it if:</p>
</ol>
<p>We welcome patches to help make this process simpler.</p>
+</div>
<!-- *********************************************************************** -->
<div class="doc_section">
% set CFEINSTALL = `pwd`/install
</pre></li>
-<li><p>Configure, build and install the C front-end:</p>
+<li><p>Configure, build, and install the C front-end:</p>
+
+<p>
+<b>Linux/x86:</b>
+</p>
+
<pre>
% cd build
- % ../src/configure --prefix=$CFEINSTALL --disable-nls --disable-shared \
+ % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls --disable-shared \
--enable-languages=c,c++
% gmake all-gcc
% setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
% gmake all; gmake install
</pre>
+<p>
+<b>Solaris/Sparc:</b>
+</p>
+
+<p>
+For Solaris/Sparc, LLVM only supports SparcV9. Therefore, the configure
+command line should like something like this:
+</p>
+
+<pre>
+ % cd build
+ % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls --disable-shared \
+ --enable-languages=c,c++ --host=sparcv9-sun-solaris2.8
+ % gmake all-gcc
+ % setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
+ % gmake all; gmake install
+</pre>
+
<p><b>Common Problem:</b> You may get error messages regarding the fact
that LLVM does not support inline assembly. Here are two common
fixes:</p>
<hr>
<div class="doc_footer">
- <address><a href="mailto:gaeke -at- uiuc.edu">Brian Gaeke</a></address>
+ <address>Brian Gaeke</address>
<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
<br>
Last modified: $Date$