The variable ValueSize is set to 1 on both code paths, and then
[oota-llvm.git] / docs / GCCFEBuildInstrs.html
index 34de9f859495aeec9b4103ec1bfa99c57e77f6a1..b675ee76a7cb7f675eece4b5f7866381947734bf 100644 (file)
@@ -14,6 +14,8 @@
 
 <ol>
   <li><a href="#instructions">Building llvm-gcc from Source</a></li>
+  <li><a href="#ada">Building the Ada front-end</a></li>
+  <li><a href="#fortran">Building the Fortran front-end</a></li>
   <li><a href="#license">License Information</a></li>
 </ol>
 
@@ -22,9 +24,7 @@
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
-  <a name="instructions">Building llvm-gcc from Source</a>
-</div>
+<h1><a name="instructions">Building llvm-gcc from Source</a></h1>
 <!-- *********************************************************************** -->
 
 <div class="doc_text">
@@ -67,9 +67,8 @@ svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk <i>dst-directory</i>
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
-  <a name="license">Building the Ada front-end</a>
-</div>
+<h1><a name="ada">Building the Ada front-end</a></h1>
+<!-- *********************************************************************** -->
 
 <div class="doc_text">
 <p>Building with support for Ada amounts to following the directions in the
@@ -85,10 +84,11 @@ top-level <tt>README.LLVM</tt> file, adding ",ada" to EXTRALANGS, for example:
   <li><p>The build requires having a compiler that supports Ada, C and C++.
       The Ada front-end is written in Ada so an Ada compiler is needed to
       build it.  Compilers known to work with the
-      <a href="http://llvm.org/releases/download.html">LLVM 2.4 release</a>
+      <a href="http://llvm.org/releases/download.html">LLVM 2.5 release</a>
       are <a href="http://gcc.gnu.org/releases.html">gcc-4.2</a> and the
       2005, 2006 and 2007 versions of the
       <a href="http://libre.adacore.com/">GNAT GPL Edition</a>.
+      <b>GNAT GPL 2008, gcc-4.3 and later will not work</b>.
       The LLVM parts of llvm-gcc are written in C++ so a C++ compiler is
       needed to build them.  The rest of gcc is written in C.
       Some linux distributions provide a version of gcc that supports all
@@ -101,6 +101,11 @@ top-level <tt>README.LLVM</tt> file, adding ",ada" to EXTRALANGS, for example:
       compiler with checking enabled.  This causes it to run much slower, but
       helps catch mistakes in the compiler (please report any problems using
       <a href="http://llvm.org/bugs">LLVM bugzilla</a>).</p></li>
+  <li><p>The Ada front-end <a href="http://llvm.org/PR2007">fails to
+      bootstrap</a>, due to lack of LLVM support for
+      <tt>setjmp</tt>/<tt>longjmp</tt> style exception handling (used
+      internally by the compiler), so you must specify
+      <tt>--disable-bootstrap</tt>.</p></li>
 </ol>
 
 <p>Supposing appropriate compilers are available, llvm-gcc with Ada support can
@@ -111,9 +116,9 @@ top-level <tt>README.LLVM</tt> file, adding ",ada" to EXTRALANGS, for example:
       and unpack it:</p>
 
 <pre class="doc_code">
-wget http://llvm.org/releases/2.4/llvm-2.4.tar.gz
-tar xzf llvm-2.4.tar.gz
-mv llvm-2.4 llvm
+wget http://llvm.org/releases/2.5/llvm-2.5.tar.gz
+tar xzf llvm-2.5.tar.gz
+mv llvm-2.5 llvm
 </pre>
 
       <p>or <a href="GettingStarted.html#checkout">check out the
@@ -128,9 +133,9 @@ mv llvm-2.4 llvm
       and unpack it:</p>
 
 <pre class="doc_code">
-wget http://llvm.org/releases/2.4/llvm-gcc-4.2-2.4.source.tar.gz
-tar xzf llvm-gcc-4.2-2.4.source.tar.gz
-mv llvm-gcc4.2-2.4.source llvm-gcc-4.2
+wget http://llvm.org/releases/2.5/llvm-gcc-4.2-2.5.source.tar.gz
+tar xzf llvm-gcc-4.2-2.5.source.tar.gz
+mv llvm-gcc4.2-2.5.source llvm-gcc-4.2
 </pre>
 
       <p>or <a href="GettingStarted.html#checkout">check out the
@@ -153,29 +158,32 @@ cd llvm-objects
   <li><p>Configure LLVM (here it is configured to install into <tt>/usr/local</tt>):</p>
 
 <pre class="doc_code">
-../llvm/configure --prefix=<b>/usr/local</b>
+../llvm/configure --prefix=<b>/usr/local</b> --enable-optimized --enable-assertions
 </pre>
 
       <p>If you have a multi-compiler setup and the C++ compiler is not the
       default, then you can configure like this:</p>
 
 <pre class="doc_code">
-CXX=<b>PATH_TO_C++_COMPILER</b> ../llvm/configure --prefix=<b>/usr/local</b>
+CXX=<b>PATH_TO_C++_COMPILER</b> ../llvm/configure --prefix=<b>/usr/local</b> --enable-optimized --enable-assertions
 </pre>
+
+      <p>To compile without checking (not recommended), replace
+      <tt>--enable-assertions</tt> with <tt>--disable-assertions</tt>.</p>
+
       </li>
 
-  <li><p>Build LLVM with checking enabled (use <tt>ENABLE_OPTIMIZED=1</tt> to
-         build without checking):</p>
+  <li><p>Build LLVM:</p>
 
 <pre class="doc_code">
-make ENABLE_OPTIMIZED=0
+make
 </pre>
       </li>
 
   <li><p>Install LLVM (optional):</p>
 
 <pre class="doc_code">
-make ENABLE_OPTIMIZED=0 install
+make install
 </pre>
       </li>
 
@@ -191,12 +199,15 @@ cd llvm-gcc-4.2-objects
 
   <li><p>Configure llvm-gcc (here it is configured to install into <tt>/usr/local</tt>).
       The <tt>--enable-checking</tt> flag turns on sanity checks inside the compiler.
-      If you omit it then LLVM should be built with <tt>make ENABLE_OPTIMIZED=1</tt>.
-      Additional languages can be appended to the --enable-languages switch,
+      To turn off these checks (not recommended), replace <tt>--enable-checking</tt>
+      with <tt>--disable-checking</tt>.
+      Additional languages can be appended to the <tt>--enable-languages</tt> switch,
       for example <tt>--enable-languages=ada,c,c++</tt>.</p>
 
 <pre class="doc_code">
-../llvm-gcc-4.2/configure --prefix=<b>/usr/local</b> --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-bootstrap --disable-multilib
+../llvm-gcc-4.2/configure --prefix=<b>/usr/local</b> --enable-languages=ada,c \
+                          --enable-checking --enable-llvm=$PWD/../llvm-objects \
+                         --disable-bootstrap --disable-multilib
 </pre>
 
       <p>If you have a multi-compiler setup, then you can configure like this:</p>
@@ -204,7 +215,9 @@ cd llvm-gcc-4.2-objects
 <pre class="doc_code">
 export CC=<b>PATH_TO_C_AND_ADA_COMPILER</b>
 export CXX=<b>PATH_TO_C++_COMPILER</b>
-../llvm-gcc-4.2/configure --prefix=<b>/usr/local</b> --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-bootstrap --disable-multilib
+../llvm-gcc-4.2/configure --prefix=<b>/usr/local</b> --enable-languages=ada,c \
+                          --enable-checking --enable-llvm=$PWD/../llvm-objects \
+                         --disable-bootstrap --disable-multilib
 </pre>
       </li>
 
@@ -220,13 +233,11 @@ make install
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
-  <a name="license">Building the Fortran front-end</a>
-</div>
+<h1><a name="fortran">Building the Fortran front-end</a></h1>
+<!-- *********************************************************************** -->
 
 <div class="doc_text">
-<p>
-To build with support for Fortran, follow the directions in the top-level
+<p>To build with support for Fortran, follow the directions in the top-level
 <tt>README.LLVM</tt> file, adding ",fortran" to EXTRALANGS, for example:</p>
 
 <pre class="doc_code">
@@ -236,9 +247,8 @@ EXTRALANGS=,fortran
 </div>
 
 <!-- *********************************************************************** -->
-<div class="doc_section">
-  <a name="license">License Information</a>
-</div>
+<h1><a name="license">License Information</a></h1>
+<!-- *********************************************************************** -->
 
 <div class="doc_text">
 <p>