final updates
[oota-llvm.git] / docs / FAQ.html
index 2ab00ac7e9056d137067faa74870bbbdff91feb1..b67fae3abe547d3d281e693f30b42f533a5d7667 100644 (file)
@@ -36,7 +36,6 @@
   <li><a href="#build">Build Problems</a>
   <ol>
   <li>When I run configure, it finds the wrong C compiler.</li>
-  <li>I compile the code, and I get some error about <tt>/localhome</tt>.</li>
   <li>The <tt>configure</tt> script finds the right C compiler, but it uses the
   LLVM linker from a previous build.  What do I do?</li>
   <li>When creating a dynamic library, I get a strange GLIBC error.</li>
@@ -60,6 +59,8 @@
     <li><a href="#langs">What source languages are supported?</a></li>
     <li><a href="#langhlsupp">What support is there for higher level source
       language constructs for building a compiler?</a></li>
+    <li><a href="GetElementPtr.html">I don't understand the GetElementPtr
+      instruction. Help!</a></li>
   </ol>
 
   <li><a href="#cfe">Using the GCC Front End</a>
@@ -213,22 +214,6 @@ explicitly.</p>
 
 </div>
 
-<div class="question">
-<p>I compile the code, and I get some error about <tt>/localhome</tt>.</p>
-</div>
-
-<div class="answer">
-
-<p>There are several possible causes for this.  The first is that you didn't set
-a pathname properly when using <tt>configure</tt>, and it defaulted to a
-pathname that we use on our research machines.</p>
-
-<p>Another possibility is that we hardcoded a path in our Makefiles.  If you see
-this, please email the LLVM bug mailing list with the name of the offending
-Makefile and a description of what is wrong with it.</p>
-
-</div>
-
 <div class="question">
 <p>The <tt>configure</tt> script finds the right C compiler, but it uses the
 LLVM linker from a previous build.  What do I do?</p>
@@ -425,6 +410,16 @@ rebuilding.</p>
   <a href="CompilerDriver.html">compiler driver</a> which simplifies the task
   of running optimizations, linking, and executable generation.</p>
 </div>
+
+<div class="question"><a name="langhlsupp">
+  <p>I don't understand the GetElementPtr
+      instruction. Help!</a></p>
+</div>
+<div class="answer">
+  <p>See <a href="GetElementPtr.html">The Often Misunderstood GEP
+   Instruction</a>.</li>
+</div>
+
 <!-- *********************************************************************** -->
 <div class="doc_section">
   <a name="cfe">Using the GCC Front End</a>
@@ -448,28 +443,21 @@ or translation to the C back end).  That is why configure thinks your system
 <p>
 To work around this, perform the following steps:
 </p>
-
 <ol>
-  <li>
-  Make sure the CC and CXX environment variables contains the full path to the
-  LLVM GCC front end.
-  </li>
+  <li>Make sure the CC and CXX environment variables contains the full path to 
+  the LLVM GCC front end.</li>
 
-  <li>
-  Make sure that the regular C compiler is first in your PATH.
-  </li>
+  <li>Make sure that the regular C compiler is first in your PATH. </li>
 
-  <li>
-  Add the string "-Wl,-native" to your CFLAGS environment variable.
-  </li>
+  <li>Add the string "-Wl,-native" to your CFLAGS environment variable.</li>
 </ol>
 
 <p>
-This will allow the gccld linker to create a native code executable instead of
-a shell script that runs the JIT.  Creating native code requires standard
-linkage, which in turn will allow the configure script to find out if code is
-not linking on your system because the feature isn't available on your system.
-</p>
+This will allow the <tt>llvm-ld</tt> linker to create a native code executable 
+instead of shell script that runs the JIT.  Creating native code requires 
+standard linkage, which in turn will allow the configure script to find out if 
+code is not linking on your system because the feature isn't available on your 
+system.</p>
 </div>
 
 <div class="question">
@@ -529,8 +517,8 @@ C++ support for a processor that does not otherwise have a C++ compiler.
 <p>or:</p>
 
 <div class="doc_code">
- llvm-g++ a.cpp -c
- llvm-g++ b.cpp -c
+ llvm-g++ a.cpp -c<br>
+ llvm-g++ b.cpp -c<br>
  llvm-g++ a.o b.o -o program
 </div>
 
@@ -554,6 +542,15 @@ If you want/need it for a certain program, you can enable it by passing
 use setjmp/longjmp to implement exception support that is correct but
 relatively slow.
 </p>
+
+<p>Also note: this specific sequence of commands won't work if you use a 
+function defined in the C++ runtime library (or any other C++ library).  To 
+access an external C++ library, you must manually 
+compile libstdc++ to LLVM bytecode, statically link it into your program, then
+use the commands above to convert the whole result into C code.  Alternatively,
+you can compile the libraries and your application into two different chunks
+of C code and link them.</p>
+
 </div>