X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGettingStarted.html;h=0e871336deb83ca2aa1345113c8439ded797076a;hb=1d33bb310865528f5b1a303e33891366457bc0ef;hp=d009ae9dd2259a1327b31fb3fa76abbcc27787b2;hpb=748d82e730dd197cdb91035c90ba33bb06e93e53;p=oota-llvm.git diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index d009ae9dd22..0e871336deb 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -31,6 +31,7 @@
  • Install the GCC Front End
  • Local LLVM Configuration
  • Compiling the LLVM Suite Source Code +
  • Cross-Compiling LLVM
  • The Location of LLVM Object Files
  • Optional Configuration Items
  • @@ -38,16 +39,22 @@
  • 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
  • An Example Using the LLVM Tool Chain +
      +
    1. Example with llvm-gcc4
    2. +
  • Common Problems
  • Links @@ -77,15 +84,21 @@ 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 +analyzer and bytecode 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 +end uses the GCC parser to convert code to LLVM. Once compiled into LLVM bytecode, 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. +

    + @@ -102,45 +115,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 GCC 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. cd llvm-gcc3.4/platform (llvm-gcc3.4 only)
      + ./fixheaders
    9. +
    10. 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 @@ -150,10 +171,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.
    @@ -189,71 +210,126 @@ software you will need.

    LLVM is known to work on the following platforms:

    - +
    - - - - + - - - - - + + - - - - + - - - - - + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + +
    OS ArchSource codeObject codeGCC front endTotal spaceCompilers
    Linuxx86157 MB2.5 GB30 MB2.6 GBx861GCC
    Solaris V9 (Ultrasparc)57 MB2.5 GB46 MB2.6 GBGCC
    FreeBSDx86157 MB850 MB40 MB1 GBx861GCC
    MacOS X2MacOS X2 PowerPC57 MB1.5 GB36 MB1.6 GBGCC
    MacOS X2x86GCC
    Cygwin/Win32x861,8GCC 3.4.X, binutils 2.15
    MinGW/Win32x861,6,8GCC 3.4.X, binutils 2.15
    Linuxamd643GCC
    + +

    LLVM has partial support for the following platforms:

    + + + + + + - + + + + + - - - - + - + - - - - + + + + + + + + + + + + + + + + +
    OSArchCompilers
    AIX3Windowsx861Visual Studio .NET4,5
    AIX3,4 PowerPC92 MB2.8 GB123 MB3 GBGCC
    Linux3Linux3,5 PowerPC30 MB1.1 GB--1 GBGCC
    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
    -

    +

    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 (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 @@ -275,7 +351,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.

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

    - + + + + + + + @@ -298,106 +380,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
    CVS≥1.11CVS 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 needed so there's no need - to build the other languages for LLVM's purposes. See - below for specific version info. -
    8. -
    9. You only need CVS if you intend to build from the +
    10. 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.
    11. +
    12. You only need CVS if you intend to build from the latest LLVM sources. If you're working from a release distribution, you don't need CVS.
    13. +
    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: