From abb1b588c2eb08ab9dd306b50001805bdce89553 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Fri, 10 Oct 2003 16:17:19 +0000 Subject: [PATCH] Removed information about compiling the GCC front end. This will be in a separate document that we will provide to people who request the source. Updated the support architecture information to be a little more precise. Added hyperlinks for all of the tools which are required for building LLVM. This should make it easier for people to find and install these required tools. Italicized some of the "variables" that we use in place of absolute paths. Added the --enable-spec2000 option to the quick start section. Other minor changes/corrections/clarifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9006 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/GettingStarted.html | 209 +++++++++++---------------------------- 1 file changed, 60 insertions(+), 149 deletions(-) diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index 903d73560d1..ea273a39557 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -27,13 +27,13 @@
  • Getting Started Quickly (A Summary) -
  • Getting started with LLVM +
  • Getting Started with LLVM
    1. Terminology and Notation
    2. Setting Up Your Environment
    3. Unpacking the LLVM Archives
    4. Checkout LLVM from CVS -
    5. Install the C Front End +
    6. Install the GCC Front End
    7. Local LLVM Configuration
    8. Compiling the LLVM Suite Source Code
    9. The Location of LLVM Object Files @@ -43,11 +43,11 @@
    10. CVS directories
    11. llvm/include
    12. llvm/lib +
    13. llvm/runtime
    14. llvm/test
    15. llvm/tools
    16. llvm/utils
    -
  • Compiling the LLVM GCC Front End
  • An Example Using the LLVM Tool Chain
  • Common Problems
  • Links @@ -89,7 +89,7 @@ LLVM is known to work on the following platforms: @@ -295,9 +281,7 @@ simplify working with the LLVM front-end and compiled tools. See the next section for other useful details in working with LLVM, or go straight to Program Layout to learn about the - layout of the source code tree. For information on building the GCC front - end yourself, see Compiling the LLVM GCC Front End for - information. + layout of the source code tree.
    @@ -340,20 +324,8 @@
    This is the where the LLVM GCC Front End is installed.

    - For the pre-built GCC front end binaries, the LLVMGCCDIR is the + For the pre-built GCC front end binaries, the LLVMGCCDIR is cfrontend/platform/llvm-gcc. - -

    GCCSRC -
    - This is the location of the LLVM GCC front end source code (used - only if the LLVM GCC front end is being compiled). -

    - -

    GCCOBJ -
    - This is the location of the LLVM GCC front end object code (used - only if the LLVM GCC front end is being compiled). It can be - safely removed once the LLVM GCC front end is built and installed. @@ -373,8 +345,8 @@ libraries that it will need for compilation.

    -

    alias llvmgcc LLVMGCCDIR/bin/llvm-gcc -
    alias llvmg++ LLVMGCCDIR/bin/llvm-g++ +
    alias llvmgcc LLVMGCCDIR/llvm-gcc/bin/gcc +
    alias llvmg++ LLVMGCCDIR/llvm-gcc/bin/g++
    This alias allows you to use the LLVM C and C++ front ends without putting them in your PATH or typing in their complete pathnames. @@ -386,11 +358,11 @@

    If you have the LLVM distribution, you will need to unpack it before you - can begin to compile it. LLVM is distributed as a set of four files. Each + can begin to compile it. LLVM is distributed as a set of three files. Each file is a TAR archive that is compressed with the gzip program.

    -

    The four files are as follows: +

    The three files are as follows:

    llvm.tar.gz
    This is the source code to the LLVM suite. @@ -402,11 +374,6 @@
    cfrontend.x86.tar.gz
    This is the binary release of the GCC front end for Linux/x86. -

    - -

    cfrontend-src.tar.gz -
    This is the source code release of the GCC front end. -

    @@ -427,8 +394,7 @@

    Note that the GCC front end is not included in the CVS repository. You - should have either downloaded the source, or better yet, downloaded the - binary distribution for your platform. + should have downloaded the binary distribution for your platform.

    @@ -457,7 +423,7 @@

    Once checked out from the CVS repository, the LLVM suite source code must be configured via the configure script. This script sets variables in llvm/Makefile.config and - llvm/include/Config/config.h. It also populates OBJ_ROOT with + llvm/include/Config/config.h. It also populates OBJ_ROOT with the Makefiles needed to build LLVM.

    @@ -477,7 +443,7 @@ CC Tells configure which C compiler to use. By default, - configure will look for the first GCC compiler in + configure will look for the first GCC C compiler in PATH. Use this variable to override configure's default behavior. @@ -487,7 +453,7 @@ CXX Tells configure which C++ compiler to use. By default, - configure will look for the first GCC compiler in + configure will look for the first GCC C++ compiler in PATH. Use this variable to override configure's default behavior. @@ -520,11 +486,11 @@

    --enable-spec2000=<directory>
    Enable the use of SPEC2000 when testing LLVM. This is disabled by default - (unless configure find SPEC2000 installed). By specifying + (unless configure finds SPEC2000 installed). By specifying directory, you can tell configure where to find the SPEC2000 - benchmarks. If directory is left unspecified, it - configure uses a default value for our internal - installation of SPEC2000. + benchmarks. If directory is left unspecified, configure + uses the default value + /home/vadve/shared/benchmarks/speccpu2000/benchspec.

    @@ -535,7 +501,7 @@ cd OBJ_ROOT

    -

  • Run the script located in the LLVM source tree: +
  • Run the configure script located in the LLVM source tree:
    SRC_ROOT/configure

    @@ -547,10 +513,10 @@ This environment variable is used to locate "system" libraries like "-lc" and "-lm" when linking. This variable should be set to the absolute path for the bytecode-libs subdirectory of the GCC front end - install, or LLVMGCCDIR/llvm-gcc/bytecode-libs. For example, one might + install, or LLVMGCCDIR/llvm-gcc/bytecode-libs. For example, one might set LLVM_LIB_SEARCH_PATH to /home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs for the X86 - version of the C front-end on our research machines.

    + version of the GCC front end on our research machines.

    Compiling the LLVM Suite Source Code

    @@ -563,17 +529,18 @@
    Debug Builds
    These builds are the default when one types gmake (unless the - --enable-optimized option was used during configuration). They - compile the tools and libraries with debugging information. + --enable-optimized option was used during configuration). The + build system will compile the tools and libraries with debugging + information.

    Release (Optimized) Builds
    These builds are enabled with the --enable-optimized option to configure or by specifying ENABLE_OPTIMIZED=1 on the - gmake command line. They compile the tools and libraries with GCC - optimizer flags on and strip debugging information from the libraries - and executables it generates. + gmake command line. For these builds, the build system will + compile the tools and libraries with GCC optimizations enabled and strip + debugging information from the libraries and executables it generates.

    Profile Builds @@ -584,8 +551,8 @@ on the gmake command line. - Once you have LLVM configured, you can build it by entering the OBJ_ROOT - directory and issuing the following command: + Once you have LLVM configured, you can build it by entering the + OBJ_ROOT directory and issuing the following command:

    gmake @@ -746,13 +713,13 @@

  • llvm/include/Support - This directory contains generic support libraries that are independent of LLVM, but are used by LLVM. For example, some C++ STL utilities and a Command Line option processing - library. + library store their header files here.
  • llvm/include/Config - This directory contains header files configured by the configure script. They wrap "standard" UNIX and C header files. Source code can include these header files which - automatically take care of the conditional #includes that the configure - script generates. + automatically take care of the conditional #includes that the + configure script generates. @@ -760,7 +727,7 @@ This directory contains most of the source files of the LLVM system. In - LLVM almost all + LLVM, almost all code exists in libraries, making it very easy to share code among the different tools.

    @@ -897,8 +864,8 @@

    gccld
    gccld links together several LLVM bytecode files into one bytecode file and does some optimization. It is - the linker invoked by the gcc frontend when multiple .o files need to be - linked together. Like gccas the command line interface of + the linker invoked by the GCC frontend when multiple .o files need to be + linked together. Like gccas, the command line interface of gccld is designed to match the system linker, to aid interfacing with the GCC frontend.

    @@ -979,62 +946,6 @@ - -

    Compiling the LLVM GCC Front End

    -
    - - -

    - - This step is optional if you have the GCC front end binary distribution for - your platform. - -

    - - Now that you have the LLVM suite built, you can build the GCC front end. For - those of you that have built GCC before, the process is very similar. -

    - Be forewarned, though: the build system for the GCC 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: - -

      -
    1. Ensure that OBJ_ROOT/llvm/tools/Debug is at the - end of your PATH 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. - -
    2. cd GCCOBJ - -
    3. Configure the source code: -
        -
      • On Linux/x86, use -
          -
        • GCCSRC/configure --prefix=LLVMGCCDIR - --enable-languages=c -
        - -
      • On Solaris/Sparc, use -
          -
        • GCCSRC/configure --prefix=LLVMGCCDIR - --enable-languages=c --target=sparcv9-sun-solaris2 -
        -
      - -
    4. gmake - -
    5. The build will eventually fail. Don't worry; chances are good that - everything that needed to build is built. - -
    6. gmake -k install -
    - -

    - Once this is done, you should have a built front end compiler in - LLVMGCCDIR. -

    -

    An Example Using the LLVM Tool Chain
    -- 2.34.1