From 8655b151377bac396302af7646797c0db4ee4627 Mon Sep 17 00:00:00 2001
From: Duncan Sands This section describes how to acquire and build llvm-gcc 4.0 and 4.2, which are
-based on the GCC 4.0.1/4.2.1 front-ends respectively. Both front-ends support C,
-C++, Objective-C and Objective-C++. The 4.2 front-end also supports Ada and
-Fortran to some extent. Note that the instructions for building these front-ends
-are completely different (and much easier!) than those for building llvm-gcc3 in
-the past. Retrieve the appropriate llvm-gcc4.x-y.z.source.tar.gz archive from the
- llvm web site. It is also possible to download the sources of the llvm-gcc front end
- from a read-only mirror using subversion. To check out the 4.0 code
- for first time use: To check out the 4.2 code use: After that, the code can be be updated in the destination directory
- using: The mirror is brought up to date every evening. Building with support for Ada amounts to following the directions in the
-top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example:
-EXTRALANGS=,ada There are some complications however: The only platform for which the Ada front-end is known to build is
- 32 bit intel x86 running linux. It is unlikely to build for other
- systems without some work. 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. What is more, the Ada compiler must not be more recent
- than what it is trying to compile, otherwise the build will fail.
- This rules out gcc-4.3 (but not gcc-4.2) and also the
- 2007 GNAT GPL Edition.
- 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
- three languages (the Ada part often comes as an add-on package to
- the rest of gcc). Otherwise it is possible to combine two versions
- of gcc, one that supports Ada and C (such as the
- 2006 GNAT GPL Edition)
- and another which supports C++, see below. Because the Ada front-end is experimental, it is wise to build the
- compiler with checking enabled. This causes it to run slower, but
- helps catch mistakes in the compiler (please report any problems using
- LLVM bugzilla). Supposing appropriate compilers are available, llvm-gcc with Ada support can
- be built on an x86-32 linux box using the following recipe: Download the LLVM source
- and unpack it: or check out the
- latest version from subversion: Download the
- llvm-gcc-4.2 source
- and unpack it: or check out the
- latest version from subversion: Make a build directory llvm-objects for llvm and make it the
- current directory: Configure LLVM (here it is configured to install into /usr/local): If you have a multi-compiler setup and the C++ compiler is not the
- default, then you can configure like this: Build LLVM with checking enabled (use ENABLE_OPTIMIZED=1 to
- build without checking): Install LLVM (optional): Make a build directory llvm-gcc-4.2-objects for llvm-gcc and make it the
- current directory: Configure llvm-gcc (here it is configured to install into /usr/local).
- The --enable-checking flag turns on sanity checks inside the compiler.
- If you omit it then LLVM must be built with make ENABLE_OPTIMIZED=1.
- Additional languages can be appended to the --enable-languages switch,
- for example --enable-languages=ada,c,c++. If you have a multi-compiler setup, then you can configure like this: Build and install the compiler:
-To build with support for Fortran, follow the directions in the top-level
-README.LLVM file, adding ",fortran" to EXTRALANGS, for example:
-The LLVM GCC frontend is licensed to you under the GNU General Public License
-and the GNU Lesser General Public License. Please see the files COPYING and
-COPYING.LIB for more details.
-
-More information is available in the FAQ.
- This section describes how to acquire and build llvm-gcc 4.0 and 4.2, which are
+based on the GCC 4.0.1/4.2.1 front-ends respectively. Both front-ends support C,
+C++, Objective-C and Objective-C++. The 4.2 front-end also supports Ada and
+Fortran to some extent. Note that the instructions for building these front-ends
+are completely different (and much easier!) than those for building llvm-gcc3 in
+the past. Retrieve the appropriate llvm-gcc4.x-y.z.source.tar.gz archive from the
+ llvm web site. It is also possible to download the sources of the llvm-gcc front end
+ from a read-only mirror using subversion. To check out the 4.0 code
+ for first time use: To check out the 4.2 code use: After that, the code can be be updated in the destination directory
+ using: The mirror is brought up to date every evening. Building with support for Ada amounts to following the directions in the
+top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example:
+EXTRALANGS=,ada There are some complications however: The only platform for which the Ada front-end is known to build is
+ 32 bit intel x86 running linux. It is unlikely to build for other
+ systems without some work. 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. What is more, the Ada compiler must not be more recent
+ than what it is trying to compile, otherwise the build will fail.
+ This rules out gcc-4.3 (but not gcc-4.2) and also the
+ 2007 GNAT GPL Edition.
+ 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
+ three languages (the Ada part often comes as an add-on package to
+ the rest of gcc). Otherwise it is possible to combine two versions
+ of gcc, one that supports Ada and C (such as the
+ 2006 GNAT GPL Edition)
+ and another which supports C++, see below. Because the Ada front-end is experimental, it is wise to build the
+ compiler with checking enabled. This causes it to run slower, but
+ helps catch mistakes in the compiler (please report any problems using
+ LLVM bugzilla). Supposing appropriate compilers are available, llvm-gcc with Ada support can
+ be built on an x86-32 linux box using the following recipe: Download the LLVM source
+ and unpack it: or check out the
+ latest version from subversion: Download the
+ llvm-gcc-4.2 source
+ and unpack it: or check out the
+ latest version from subversion: Make a build directory llvm-objects for llvm and make it the
+ current directory: Configure LLVM (here it is configured to install into /usr/local): If you have a multi-compiler setup and the C++ compiler is not the
+ default, then you can configure like this: Build LLVM with checking enabled (use ENABLE_OPTIMIZED=1 to
+ build without checking): Install LLVM (optional): Make a build directory llvm-gcc-4.2-objects for llvm-gcc and make it the
+ current directory: Configure llvm-gcc (here it is configured to install into /usr/local).
+ The --enable-checking flag turns on sanity checks inside the compiler.
+ If you omit it then LLVM must be built with make ENABLE_OPTIMIZED=1.
+ Additional languages can be appended to the --enable-languages switch,
+ for example --enable-languages=ada,c,c++. If you have a multi-compiler setup, then you can configure like this: Build and install the compiler:
+To build with support for Fortran, follow the directions in the top-level
+README.LLVM file, adding ",fortran" to EXTRALANGS, for example:
+The LLVM GCC frontend is licensed to you under the GNU General Public License
+and the GNU Lesser General Public License. Please see the files COPYING and
+COPYING.LIB for more details.
+
+More information is available in the FAQ.
+
-
-
-
-svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.0/trunk dst-directory
-
-
-svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk dst-directory
-
-svn update
-
-
-
-
-
-
-wget http://llvm.org/releases/2.2/llvm-2.2.tar.gz
-tar xzf llvm-2.2.tar.gz
-mv llvm-2.2 llvm
-svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
-wget http://llvm.org/releases/2.2/llvm-gcc4.2-2.2.source.tar.gz
-tar xzf llvm-gcc4.2-2.2.source.tar.gz
-mv llvm-gcc4.2-2.2.source llvm-gcc-4.2
-svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk llvm-gcc-4.2
-mkdir llvm-objects
-cd llvm-objects
-../llvm/configure --prefix=/usr/local
-CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local
-make ENABLE_OPTIMIZED=0
-make install
-
-cd ..
-mkdir llvm-gcc-4.2-objects
-cd llvm-gcc-4.2-objects
-../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib
-
-export CC=PATH_TO_C_AND_ADA_COMPILER
-export CXX=PATH_TO_C++_COMPILER
-../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib
-make
-make install
-
-EXTRALANGS=,fortran
-
-
- Last modified: $Date$
+ Last modified: $Date: 2008-02-13 17:46:10 +0100 (Wed, 13 Feb 2008) $
diff --git a/docs/GCCFEBuildInstrs.html b/docs/GCCFEBuildInstrs.html
new file mode 100644
index 0000000000..289bda304e
--- /dev/null
+++ b/docs/GCCFEBuildInstrs.html
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.0/trunk dst-directory
+
+
+svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk dst-directory
+
+svn update
+
+
+
+
+
+
+wget http://llvm.org/releases/2.2/llvm-2.2.tar.gz
+tar xzf llvm-2.2.tar.gz
+mv llvm-2.2 llvm
+svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
+wget http://llvm.org/releases/2.2/llvm-gcc4.2-2.2.source.tar.gz
+tar xzf llvm-gcc4.2-2.2.source.tar.gz
+mv llvm-gcc4.2-2.2.source llvm-gcc-4.2
+svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk llvm-gcc-4.2
+mkdir llvm-objects
+cd llvm-objects
+../llvm/configure --prefix=/usr/local
+CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local
+make ENABLE_OPTIMIZED=0
+make install
+
+cd ..
+mkdir llvm-gcc-4.2-objects
+cd llvm-gcc-4.2-objects
+../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib
+
+export CC=PATH_TO_C_AND_ADA_COMPILER
+export CXX=PATH_TO_C++_COMPILER
+../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-shared --disable-bootstrap --disable-multilib
+make
+make install
+
+EXTRALANGS=,fortran
+
+
+
+
+
+
+ LLVM Compiler Infrastructure
+ Last modified: $Date$
+
+
+
+
diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html
index 3c06db1492..24f422ea9e 100644
--- a/docs/GettingStarted.html
+++ b/docs/GettingStarted.html
@@ -338,7 +338,7 @@ on your platform.
The GCC front end is not very portable at the moment. If you want to get it to work on another platform, you can download a copy of the source and try to compile it on your platform.
+href="GCCFEBuildInstrs.html">try to compile it on your platform. @@ -518,7 +518,7 @@ href="http://gcc.gnu.org/PR13392">serious bug which causes it to crash in the "convert_from_eh_region_ranges_1" GCC function.Cygwin GCC 3.3.3: The version of GCC 3.3.3 commonly shipped with - Cygwin does not work. Please upgrade + Cygwin does not work. Please upgrade to a newer version if possible.
SuSE GCC 3.3.3: The version of GCC 3.3.3 shipped with SuSE 9.1 (and possibly others) does not compile LLVM correctly (it appears that exception @@ -741,7 +741,7 @@ configured by the LLVM configure script as well as automatically updated when you run svn update.
If you would like to get the GCC front end source code, you can also get it -and build it yourself. Please follow these +and build it yourself. Please follow these instructions to successfully get and build the LLVM GCC front-end.
@@ -756,7 +756,7 @@ instructions to successfully get and build the LLVM GCC front-end.Before configuring and compiling the LLVM suite, you can optionally extract the LLVM GCC front end from the binary distribution. It is used for running the llvm-test testsuite and for compiling C/C++ programs. Note that you can optionally -build llvm-gcc yourself after building the +build llvm-gcc yourself after building the main LLVM repository.
To install the GCC front end, do the following:
@@ -781,7 +781,7 @@ file, not "fix" a header file that needs to be fixed for GCC, or it may be linked with libraries not available on your system.In cases like these, you may want to try building the GCC front end from source. This is +href="GCCFEBuildInstrs.html">building the GCC front end from source. This is much easier now than it was in the past.
@@ -836,7 +836,7 @@ script to configure the build system: will fail as these libraries require llvm-gcc and llvm-g++. See Install the GCC Front End for details on installing the C/C++ Front End. See - Bootstrapping the LLVM C/C++ Front-End + Bootstrapping the LLVM C/C++ Front-End for details on building the C/C++ Front End.