- <!--=====================================================================-->
- <h2><center><a name="cfront">Compiling the LLVM C Front End</center></h2>
- <!--=====================================================================-->
-
- <p>
- <b>
- This step is optional if you have the C front end binary distribution for
- your platform.
- </b>
- </p>
-
- Now that you have the LLVM suite built, you can build the C front end. For
- those of you that have built GCC before, the process is very similar.
- <p>
- Be forewarned, though: the build system for the C front end is not as
- polished as the rest of the LLVM code, so there will be many warnings and
- errors that you will need to ignore for now:
-
- <ol>
- <li>Ensure that <tt><i>OBJ_ROOT</i>/llvm/tools/Debug</tt> is at the
- <i>end</i> of your <tt>PATH</tt> environment variable. The front end
- build needs to know where to find the LLVM tools, but you want to
- ensure that these tools are not found before the system assembler and
- linker that you normally use for compilation.
-
- <li><tt>cd <i>GCCOBJ</i></tt>
-
- <li>Configure the source code:
- <ul>
- <li>On Linux/x86, use
- <ul>
- <li><tt><i>GCCSRC</i>/configure --prefix=<i>LLVMGCCDIR</i>
- --enable-languages=c</tt>
- </ul>
-
- <li>On Solaris/Sparc, use
- <ul>
- <li><tt><i>GCCSRC</i>/configure --prefix=<i>LLVMGCCDIR</i>
- --enable-languages=c --target=sparcv9-sun-solaris2</tt>
- </ul>
- </ul>
-
- <li><tt>gmake</tt>
-
- <li>The build will eventually fail. Don't worry; chances are good that
- everything that needed to build is built.
-
- <li><tt>gmake -k install</tt>
- </ol>
-
- <p>
- Once this is done, you should have a built front end compiler in
- <tt><i>LLVMGCCDIR</i></tt>.
- </p>
-