X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGettingStarted.html;h=bcf36c38c77af2c1fe226c896f4730cb7134f87d;hb=516276edd4adadf8d521ae6ba29713dacc353c0a;hp=c9aa30422adbcc4bf921bb40f85381294674548a;hpb=66db92eb6439b55a21ec5aaabfcd6726dc9b33b6;p=oota-llvm.git diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index c9aa30422ad..bcf36c38c77 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -17,40 +17,43 @@
  • Getting Started Quickly (A Summary)
  • Requirements
      -
    1. Hardware -
    2. Software -
    3. Broken versions of GCC +
    4. Hardware
    5. +
    6. Software
    7. +
    8. Broken versions of GCC and other tools
  • 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 GCC Front End -
    6. Local LLVM Configuration -
    7. Compiling the LLVM Suite Source Code -
    8. The Location of LLVM Object Files -
    9. Optional Configuration Items +
    10. Terminology and Notation
    11. +
    12. Setting Up Your Environment
    13. +
    14. Unpacking the LLVM Archives
    15. +
    16. Checkout LLVM from Subversion
    17. +
    18. Install the GCC Front End
    19. +
    20. Local LLVM Configuration
    21. +
    22. Compiling the LLVM Suite Source Code
    23. +
    24. Cross-Compiling LLVM
    25. +
    26. The Location of LLVM Object Files
    27. +
    28. Optional Configuration Items
  • Program layout
      -
    1. CVS directories -
    2. llvm/examples -
    3. llvm/include -
    4. llvm/lib -
    5. llvm/projects -
    6. llvm/runtime -
    7. llvm/test -
    8. llvm-test -
    9. llvm/tools -
    10. llvm/utils -
    11. llvm/win32 +
    12. llvm/examples
    13. +
    14. llvm/include
    15. +
    16. llvm/lib
    17. +
    18. llvm/projects
    19. +
    20. llvm/runtime
    21. +
    22. llvm/test
    23. +
    24. llvm-test
    25. +
    26. llvm/tools
    27. +
    28. llvm/utils
    29. +
    30. llvm/win32
  • An Example Using the LLVM Tool Chain +
      +
    1. Example with llvm-gcc4
    2. +
  • Common Problems
  • Links @@ -79,16 +82,22 @@ basic information.

    First, LLVM comes in two pieces. The first piece is the LLVM suite. This contains all of the tools, libraries, and header files needed to use the low -level virtual machine. It contains an assembler, disassembler, bytecode -analyzer, and bytecode optimizer. It also contains a test suite that can be +level virtual machine. It contains an assembler, disassembler, bitcode +analyzer and bitcode optimizer. It also contains a test suite that can be used to test the LLVM tools and the GCC front end.

    The second piece is the GCC front end. This component provides a version of -GCC that compiles C and C++ code into LLVM bytecode. Currently, the GCC front -end is a modified version of GCC 3.4 (we track the GCC 3.4 development). Once -compiled into LLVM bytecode, a program can be manipulated with the LLVM tools +GCC that compiles C and C++ code into LLVM bitcode. Currently, the GCC front +end uses the GCC parser to convert code to LLVM. Once +compiled into LLVM bitcode, a program can be manipulated with the LLVM tools from the LLVM suite.

    +

    +There is a third, optional piece called llvm-test. It is a suite of programs +with a testing harness that can be used to further test LLVM's functionality +and performance. +

    + @@ -105,46 +114,53 @@ from the LLVM suite.

  • Read the documentation.
  • Read the documentation.
  • Remember that you were warned twice about reading the documentation.
  • -
  • Install the GCC front end: +
  • Install the llvm-gcc4.0 (or llvm-gcc4.2) front end if you intend to compile C or C++:
      -
    1. cd where-you-want-the-C-front-end-to-live -
    2. gunzip --stdout cfrontend.platform.tar.gz | tar -xvf - -
    3. Sparc and MacOS X Only:
      - cd cfrontend/platform
      - ./fixheaders
      +
    4. cd where-you-want-the-C-front-end-to-live
    5. +
    6. gunzip --stdout llvm-gcc.platform.tar.gz | tar -xvf - +
    7. + +
    8. Add llvm-gcc's "bin" directory to your PATH variable.
  • -
  • Get the Source Code +
  • Get the LLVM Source Code
  • + +
  • [Optional] Get the Test Suite Source Code +
  • +
  • Configure the LLVM Build Environment
      -
    1. Change directory to where you want to store the LLVM object - files and run configure to configure the Makefiles and - header files for the default platform. Useful options include: +
    2. cd where-you-want-to-build-llvm
    3. +
    4. /path/to/llvm/configure [options]
      + Some common options: +
        +
      • --prefix=directory +

        Specify for directory the full pathname of where you + want the LLVM tools and libraries to be installed (default + /usr/local).

      • --with-llvmgccdir=directory -

        Specify the full pathname of where the LLVM GCC frontend is - installed.

      • +

        Optionally, specify for directory the full pathname of the + C/C++ front end installation to use with this LLVM configuration. If + not specified, the PATH will be searched.

      • --enable-spec2000=directory

        Enable the SPEC2000 benchmarks for testing. The SPEC2000 benchmarks should be available in @@ -154,10 +170,10 @@ from the LLVM suite.

      • Build the LLVM Suite:
          -
        1. Set your LLVM_LIB_SEARCH_PATH environment variable.
        2. gmake -k |& tee gnumake.out    # this is csh or tcsh syntax
        3. -
        4. If you get an "internal compiler error (ICE)" see below.
        5. +
        6. If you get an "internal compiler error (ICE)" or test failures, see + below.
    @@ -193,7 +209,7 @@ software you will need.

    LLVM is known to work on the following platforms:

    - +
    @@ -201,7 +217,7 @@ software you will need.

    - + @@ -211,24 +227,40 @@ software you will need.

    - + - + + + + + + + - + + + + + + + + + + +
    OS Arch
    Linuxx861x861 GCC
    FreeBSDx861x861 GCC
    MacOS X2MacOS X2 PowerPC GCC
    MacOS X2x86GCC
    Cygwin/Win32x861x861,8GCC 3.4.X, binutils 2.15
    MinGW/Win32x861,6,8GCC 3.4.X, binutils 2.15
    Linuxamd643 GCC

    LLVM has partial support for the following platforms:

    - +
    @@ -236,39 +268,71 @@ software you will need.

    - - + + - + - + + + + + + + + + + + + + + + + +
    OS Arch
    Windowsx861Visual Studio .NET4,5, MinGWx861Visual Studio .NET4,5
    AIX3,4AIX3,4 PowerPC GCC
    Linux3,5Linux3,5 PowerPC GCC
    Linux7AlphaGCC
    Linux7Itanium (IA-64)GCC
    HP-UX7Itanium (IA-64)HP aCC
    -

    -Notes:
    -1 Code generation supported for Pentium processors and up
    -2 Code generation supported for 32-bit ABI only
    -3 No native code generation
    -4 Build is not complete: one or more tools don't link
    -5 The GCC-based C/C++ frontend does not build
    -

    +

    Notes:

    + +
    +
      +
    1. Code generation supported for Pentium processors and +up
    2. +
    3. Code generation supported for 32-bit ABI only
    4. +
    5. No native code generation
    6. +
    7. Build is not complete: one or more tools don't link
    8. +
    9. The GCC-based C/C++ frontend does not build
    10. +
    11. The port is done using the MSYS shell. +Download and install +bison (excl. M4.exe) and flex in that order. Build binutils-2.15 from source, +if necessary. Bison & flex can be also grabbed from GNUWin32 sf.net +project.
    12. +
    13. Native code generation exists but is not complete.
    14. +
    15. Binutils up to post-2.17 has bug in bfd/cofflink.c + preventing LLVM from building correctly. Several workarounds have been + introduced into LLVM build system, but the bug can occur anytime in the + future. We highly recommend that you rebuild your current binutils with the + patch from + Binutils bugzilla, if it wasn't already applied.
    16. +
    +

    Note that you will need about 1-3 GB of space for a full LLVM build in Debug -mode, depending on the system (because of all the debug info), and the libraries -appear in more than one of the tools that get linked, so there is some -duplication. If you do not need many of the tools and you are space-conscious, +mode, depending on the system (it is so large because of all the debugging +information and the fact that the libraries are statically linked into multiple +tools). If you do not need many of the tools and you are space-conscious, you can disable them individually in llvm/tools/Makefile. The Release build requires considerably less space.

    The LLVM suite may compile on other platforms, but it is not guaranteed to do so. If compilation is successful, the LLVM utilities should be -able to assemble, disassemble, analyze, and optimize LLVM bytecode. Code +able to assemble, disassemble, analyze, and optimize LLVM bitcode. Code generation should work as well, although the generated native code may not work on your platform.

    @@ -286,7 +350,7 @@ href="CFEBuildInstrs.html">try to compile it on your platform.

    is the usual name for the software package that LLVM depends on. The Version column provides "known to work" versions of the package. The Notes column describes how LLVM uses the package and provides other details.

    - +
    @@ -298,7 +362,13 @@ href="CFEBuildInstrs.html">try to compile it on your platform.

    - + + + + + + + @@ -309,106 +379,84 @@ href="CFEBuildInstrs.html">try to compile it on your platform.

    - + + + + + + + - + - + - + + + + + + + - + - + - - - - - - - - + + - - - - - - - - - - - - - - - - - - - +
    PackageVersionNotes
    GCC 3.4.2C/C++ compiler (Note 4)C/C++ compiler1
    TeXinfo4.5For building the CFE
    Bison1.351.28, 1.35, 1.75, 1.875d, 2.0, or 2.1
    (not 1.85 or 1.875)
    YACC compiler
    SVN≥1.3Subversion access to LLVM2
    DejaGnu 1.4.2Automated test suite (Note 2)Automated test suite3
    tcl 8.3, 8.4Automated test suite (Note 2)Automated test suite3
    expect 5.38.0Automated test suite (Note 2)Automated test suite3
    perl≥5.6.0Nightly tester, utilities
    GNU M4 1.4Macro processor for configuration (Note 1)Macro processor for configuration4
    GNU Autoconf 2.59Configuration script builder (Note 1)Configuration script builder4
    GNU Automake2.59aclocal macro generator (Note 1)
    perl>5.6.0Nightly tester, utilities1.9.2aclocal macro generator4
    libtool 1.5.10Shared library manager (Note 1)
    QMTest2.0.3Automated test suite (Note 2, - Note 3)
    Python2.3Automated test suite (Note 2, - Note 3)
    CVS>1.11CVS access to LLVM (Note 5)Shared library manager4
    -

    Notes:

    +

    Notes:

    +
      -
    1. If you want to make changes to the configure scripts, - you will need GNU autoconf (2.59), and consequently, GNU M4 (version 1.4 - or higher). You will also need automake. We only use aclocal from that - package.
    2. -
    3. Only needed if you want to run the automated test - suite in the test directory.
    4. -
    5. These are needed to use the LLVM test suite. - Please note that newer versions of QMTest may not work with the LLVM - test suite. QMTest 2.0.3 can be retrieved from the QMTest CVS - repository using the following commands: -
        -
      • cvs -d :pserver:anoncvs@cvs.codesourcery.com:/home/qm/Repository login
      • -
      • When prompted, use anoncvs as the password.
      • -
      • cvs -d :pserver:anoncvs@cvs.codesourcery.com:/home/qm/Repository co -r release-2-0-3 qm
      • -
      -
    6. -
    7. Only the C and C++ languages are needed so there's no +
    8. Only the C and C++ languages are needed so there's no need to build the other languages for LLVM's purposes. See - below for specific version info. -
    9. -
    10. You only need CVS if you intend to build from the + below for specific version info.
    11. +
    12. You only need Subversion if you intend to build from the latest LLVM sources. If you're working from a release distribution, you - don't need CVS.
    13. + don't need Subversion. +
    14. Only needed if you want to run the automated test + suite in the llvm/test directory.
    15. +
    16. If you want to make changes to the configure scripts, + you will need GNU autoconf (2.59), and consequently, GNU M4 (version 1.4 + or higher). You will also need automake (1.9.2). We only use aclocal + from that package.
    +
    +

    Additionally, your compilation host is expected to have the usual plethora of Unix utilities. Specifically: