X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGCCFEBuildInstrs.html;h=b675ee76a7cb7f675eece4b5f7866381947734bf;hb=d6b33a7f31242efb0e4155565e7fb0543f309f6c;hp=097bd3de6a2693215829a81424df9f403bd502a5;hpb=98301c07740124e4cf86cc8ad46b2c9f3f6c5987;p=oota-llvm.git diff --git a/docs/GCCFEBuildInstrs.html b/docs/GCCFEBuildInstrs.html index 097bd3de6a2..b675ee76a7c 100644 --- a/docs/GCCFEBuildInstrs.html +++ b/docs/GCCFEBuildInstrs.html @@ -14,6 +14,8 @@
Retrieve the appropriate llvm-gcc-4.2-x.y.source.tar.gz archive from the - llvm web site.
+Retrieve the appropriate llvm-gcc-4.2-version.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.2 code @@ -66,9 +67,8 @@ svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk dst-directory
Building with support for Ada amounts to following the directions in the @@ -84,10 +84,11 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example:
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 - LLVM 2.3 release + LLVM 2.5 release are gcc-4.2 and the 2005, 2006 and 2007 versions of the GNAT GPL Edition. + GNAT GPL 2008, gcc-4.3 and later will not work. 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 @@ -100,6 +101,11 @@ top-level README.LLVM 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 LLVM bugzilla).
The Ada front-end fails to + bootstrap, due to lack of LLVM support for + setjmp/longjmp style exception handling (used + internally by the compiler), so you must specify + --disable-bootstrap.
Supposing appropriate compilers are available, llvm-gcc with Ada support can @@ -109,140 +115,140 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example:
Download the LLVM source and unpack it:
-wget http://llvm.org/releases/2.3/llvm-2.3.tar.gz -tar xzf llvm-2.3.tar.gz -mv llvm-2.3 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 +
or check out the latest version from subversion:
-svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm+
Download the llvm-gcc-4.2 source and unpack it:
-wget http://llvm.org/releases/2.3/llvm-gcc-4.2-2.3.source.tar.gz -tar xzf llvm-gcc-4.2-2.3.source.tar.gz -mv llvm-gcc4.2-2.3.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 +
or check out the latest version from subversion:
-svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk llvm-gcc-4.2-
+svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk llvm-gcc-4.2 +
Make a build directory llvm-objects for llvm and make it the current directory:
-mkdir llvm-objects -cd llvm-objects-
+mkdir llvm-objects +cd llvm-objects +
Configure LLVM (here it is configured to install into /usr/local):
-../llvm/configure --prefix=/usr/local-
+../llvm/configure --prefix=/usr/local --enable-optimized --enable-assertions +
If you have a multi-compiler setup and the C++ compiler is not the default, then you can configure like this:
-CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local-
+CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local --enable-optimized --enable-assertions ++ +
To compile without checking (not recommended), replace + --enable-assertions with --disable-assertions.
+Build LLVM with checking enabled (use ENABLE_OPTIMIZED=1 to - build without checking):
+Build LLVM:
-make ENABLE_OPTIMIZED=0-
+make +
Install LLVM (optional):
-make ENABLE_OPTIMIZED=0 install-
+make install +
Make a build directory llvm-gcc-4.2-objects for llvm-gcc and make it the current directory:
-+cd .. mkdir llvm-gcc-4.2-objects -cd llvm-gcc-4.2-objects-
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 should be built with make ENABLE_OPTIMIZED=1. - Additional languages can be appended to the --enable-languages switch, + To turn off these checks (not recommended), replace --enable-checking + with --disable-checking. + Additional languages can be appended to the --enable-languages switch, for example --enable-languages=ada,c,c++.
-../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c --enable-checking --enable-llvm=$PWD/../llvm-objects --disable-bootstrap --disable-multilib-
+../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c \ + --enable-checking --enable-llvm=$PWD/../llvm-objects \ + --disable-bootstrap --disable-multilib +
If you have a multi-compiler setup, then you can configure like this:
-+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-bootstrap --disable-multilib-
Build and install the compiler:
-make -make install-
+make +make install +
-To build with support for Fortran, follow the directions in the top-level +
To build with support for Fortran, follow the directions in the top-level README.LLVM file, adding ",fortran" to EXTRALANGS, for example:
-+EXTRALANGS=,fortran-
@@ -261,9 +267,9 @@ More information is available in the FAQ.