From 8655b151377bac396302af7646797c0db4ee4627 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Thu, 14 Feb 2008 17:53:22 +0000 Subject: Rename CFEBuildInstrs.html to GCCFEBuildInstrs.html. Update all references to it and place a redirection page at the old address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47124 91177308-0d34-0410-b5e6-96231b3b80d8 --- Xcode/LLVM.xcodeproj/project.pbxproj | 4 +- docs/CFEBuildInstrs.html | 258 +------------------------------- docs/GCCFEBuildInstrs.html | 281 +++++++++++++++++++++++++++++++++++ docs/GettingStarted.html | 12 +- docs/index.html | 2 +- 5 files changed, 293 insertions(+), 264 deletions(-) create mode 100644 docs/GCCFEBuildInstrs.html diff --git a/Xcode/LLVM.xcodeproj/project.pbxproj b/Xcode/LLVM.xcodeproj/project.pbxproj index ee5dcfb157..876b2fec18 100644 --- a/Xcode/LLVM.xcodeproj/project.pbxproj +++ b/Xcode/LLVM.xcodeproj/project.pbxproj @@ -979,7 +979,7 @@ DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = AliasAnalysis.html; sourceTree = ""; }; DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Bugpoint.html; sourceTree = ""; }; - DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CFEBuildInstrs.html; sourceTree = ""; }; + DE66F39208ABF35C00323D32 /* GCCFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GCCFEBuildInstrs.html; sourceTree = ""; }; DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodeGenerator.html; sourceTree = ""; }; DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodingStandards.html; sourceTree = ""; }; DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; @@ -2593,7 +2593,7 @@ children = ( DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */, DE66F39008ABF35C00323D32 /* Bugpoint.html */, - DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */, + DE66F39208ABF35C00323D32 /* GCCFEBuildInstrs.html */, DE66F39308ABF35C00323D32 /* CodeGenerator.html */, DE66F39408ABF35C00323D32 /* CodingStandards.html */, DE66F39508ABF35C00323D32 /* CommandGuide */, diff --git a/docs/CFEBuildInstrs.html b/docs/CFEBuildInstrs.html index c9534095b6..8cdb197cbc 100644 --- a/docs/CFEBuildInstrs.html +++ b/docs/CFEBuildInstrs.html @@ -5,263 +5,11 @@ Building the LLVM C/C++ Front-End + -
- Building the LLVM GCC Front-End -
- -
    -
  1. Building llvm-gcc from Source
  2. -
  3. License Information
  4. -
- -
-

Written by the LLVM Team

-
- - - - - -
- -

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.

- -
    -
  1. 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:

    - -
    -
    -svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.0/trunk dst-directory
    -
    -
    - -

    To check out the 4.2 code use:

    - -
    -
    -svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk dst-directory
    -
    -
    - -

    After that, the code can be be updated in the destination directory - using:

    - -
    -
    svn update
    -
    - -

    The mirror is brought up to date every evening.

  2. - -
  3. Follow the directions in the top-level README.LLVM file for - up-to-date instructions on how to build llvm-gcc. See below for building - with support for Ada or Fortran. -
- -
- - - - -
-

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:

- -
    -
  1. 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.

  2. -
  3. 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.

  4. -
  5. 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).

  6. -
- -

Supposing appropriate compilers are available, llvm-gcc with Ada support can - be built on an x86-32 linux box using the following recipe:

- -
    -
  1. Download the LLVM source - and unpack it:

    - -
    -
    wget http://llvm.org/releases/2.2/llvm-2.2.tar.gz
    -tar xzf llvm-2.2.tar.gz
    -mv llvm-2.2 llvm
    -
    - -

    or check out the - latest version from subversion:

    - -
    -
    svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    -
    -
  2. - -
  3. Download the - llvm-gcc-4.2 source - and unpack it:

    - -
    -
    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
    -
    - -

    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
    -
    -
  4. - -
  5. Make a build directory llvm-objects for llvm and make it the - current directory:

    - -
    -
    mkdir llvm-objects
    -cd llvm-objects
    -
    -
  6. - -
  7. Configure LLVM (here it is configured to install into /usr/local):

    - -
    -
    ../llvm/configure --prefix=/usr/local
    -
    - -

    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
    -
    -
  8. - -
  9. Build LLVM with checking enabled (use ENABLE_OPTIMIZED=1 to - build without checking):

    - -
    -
    make ENABLE_OPTIMIZED=0
    -
    -
  10. - -
  11. Install LLVM (optional):

    - -
    -
    make install
    -
    -
  12. - -
  13. 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
    -
    -
  14. - -
  15. 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++.

    - -
    -
    ../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
    -
    - -

    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-shared --disable-bootstrap --disable-multilib
    -
    -
  16. - -
  17. Build and install the compiler:

    - -
    -
    make
    -make install
    -
    -
  18. -
- -
- - - - -
-

-To build with support for Fortran, follow the directions in the top-level -README.LLVM file, adding ",fortran" to EXTRALANGS, for example:

- -
-
-EXTRALANGS=,fortran
-
-
- -
- - - - -
-

-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 page has moved here.
@@ -274,7 +22,7 @@ More information is available in the FAQ. src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
- 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 @@ + + + + + + Building the LLVM GCC Front-End + + + +
+ Building the LLVM GCC Front-End +
+ +
    +
  1. Building llvm-gcc from Source
  2. +
  3. License Information
  4. +
+ +
+

Written by the LLVM Team

+
+ + + + + +
+ +

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.

+ +
    +
  1. 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:

    + +
    +
    +svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.0/trunk dst-directory
    +
    +
    + +

    To check out the 4.2 code use:

    + +
    +
    +svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk dst-directory
    +
    +
    + +

    After that, the code can be be updated in the destination directory + using:

    + +
    +
    svn update
    +
    + +

    The mirror is brought up to date every evening.

  2. + +
  3. Follow the directions in the top-level README.LLVM file for + up-to-date instructions on how to build llvm-gcc. See below for building + with support for Ada or Fortran. +
+ +
+ + + + +
+

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:

+ +
    +
  1. 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.

  2. +
  3. 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.

  4. +
  5. 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).

  6. +
+ +

Supposing appropriate compilers are available, llvm-gcc with Ada support can + be built on an x86-32 linux box using the following recipe:

+ +
    +
  1. Download the LLVM source + and unpack it:

    + +
    +
    wget http://llvm.org/releases/2.2/llvm-2.2.tar.gz
    +tar xzf llvm-2.2.tar.gz
    +mv llvm-2.2 llvm
    +
    + +

    or check out the + latest version from subversion:

    + +
    +
    svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    +
    +
  2. + +
  3. Download the + llvm-gcc-4.2 source + and unpack it:

    + +
    +
    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
    +
    + +

    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
    +
    +
  4. + +
  5. Make a build directory llvm-objects for llvm and make it the + current directory:

    + +
    +
    mkdir llvm-objects
    +cd llvm-objects
    +
    +
  6. + +
  7. Configure LLVM (here it is configured to install into /usr/local):

    + +
    +
    ../llvm/configure --prefix=/usr/local
    +
    + +

    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
    +
    +
  8. + +
  9. Build LLVM with checking enabled (use ENABLE_OPTIMIZED=1 to + build without checking):

    + +
    +
    make ENABLE_OPTIMIZED=0
    +
    +
  10. + +
  11. Install LLVM (optional):

    + +
    +
    make install
    +
    +
  12. + +
  13. 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
    +
    +
  14. + +
  15. 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++.

    + +
    +
    ../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
    +
    + +

    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-shared --disable-bootstrap --disable-multilib
    +
    +
  16. + +
  17. Build and install the compiler:

    + +
    +
    make
    +make install
    +
    +
  18. +
+ +
+ + + + +
+

+To build with support for Fortran, follow the directions in the top-level +README.LLVM file, adding ",fortran" to EXTRALANGS, for example:

+ +
+
+EXTRALANGS=,fortran
+
+
+ +
+ + + + +
+

+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. +

+
+ + + +
+
+ Valid CSS! + Valid HTML 4.01! + + 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.
--with-tclinclude
Path to the tcl include directory under which tclsh can be diff --git a/docs/index.html b/docs/index.html index 14396acb11..0d289478b9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -105,7 +105,7 @@ the LLVM system.
  • LLVM Test Suite Guide - A reference manual for using the LLVM test suite.
  • -
  • How to build the C/C++ front-end - +
  • How to build the C/C++ front-end - Instructions for building the front-end from source.
  • The LLVM Lexicon - Definition of acronyms, terms -- cgit v1.2.3-18-g5258