X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGettingStarted.html;h=0e871336deb83ca2aa1345113c8439ded797076a;hb=1d33bb310865528f5b1a303e33891366457bc0ef;hp=ceb723e394a71c8c20846e534f74c3b97f0e349f;hpb=e1a53a59b363adc8fa0ab83dd9d7b0e6c31f00c2;p=oota-llvm.git diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index ceb723e394a..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
  • @@ -51,6 +52,9 @@
  • An Example Using the LLVM Tool Chain +
      +
    1. Example with llvm-gcc4
    2. +
  • Common Problems
  • Links @@ -80,12 +84,12 @@ 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.

    @@ -114,11 +118,11 @@ and performance.
  • 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. -
    3. gunzip --stdout cfrontend.platform.tar.gz | tar -xvf - +
    4. gunzip --stdout llvm-gcc.platform.tar.gz | tar -xvf -
    5. -
    6. cd cfrontend/platform
      +
    7. cd llvm-gcc3.4/platform (llvm-gcc3.4 only)
      ./fixheaders
    8. -
    9. Add the cfrontend's "bin" directory to your PATH variable
    10. +
    11. Add llvm-gcc's "bin" directory to your PATH variable.
  • Get the LLVM Source Code @@ -156,7 +160,7 @@ and performance. /usr/local).

  • --with-llvmgccdir=directory

    Optionally, specify for directory the full pathname of the - C/C++ FrontEnd installation to use with this LLVM configuration. If + 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 @@ -169,7 +173,8 @@ and performance.

    1. gmake -k |& tee gnumake.out    # this is csh or tcsh syntax
    2. -
    3. If you get an "internal compiler error (ICE)" see below.
    4. +
    5. If you get an "internal compiler error (ICE)" or test failures, see + below.
    @@ -205,7 +210,7 @@ software you will need.

    LLVM is known to work on the following platforms:

    - +
    @@ -213,7 +218,7 @@ software you will need.

    - + @@ -223,34 +228,40 @@ software you will need.

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

    LLVM has partial support for the following platforms:

    - +
    @@ -258,47 +269,65 @@ software you will need.

    - - + + - + - + + + + + + + + + + + + + + + + +
    OS Arch
    Windowsx861Visual Studio .NET4,5x861Visual 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
    -6 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. If you want to compile the C/C++ frontend, then upgrade to -texinfo-4.5+ from source. -If you need to create a library for an MS DLL, do the following: +
      -
    1. pexports /C/WINNT/SYSTEM32/file.dll | sed "s/^_//" > -/C/MinGW/lib/file.def
    2. -
    3. Edit file and append @<ordinal> to the missing function name
    4. -
    5. dlltool.exe -k -d /C/MinGW/lib/file.def -l -/C/MinGW/lib/libfile.a.
    6. +
    7. Code generation supported for Pentium processors and +up
    8. +
    9. Code generation supported for 32-bit ABI only
    10. +
    11. No native code generation
    12. +
    13. Build is not complete: one or more tools don't link
    14. +
    15. The GCC-based C/C++ frontend does not build
    16. +
    17. 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.
    18. +
    19. Native code generation exists but is not complete.
    20. +
    21. 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.

    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.

    @@ -322,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.

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

    - + + + + + + + @@ -345,83 +380,84 @@ href="CFEBuildInstrs.html">try to compile it on your platform.

    - + + + + + + + - + - + - + + + + + + + - + - + - - - - - - - + - - - - - - - +
    PackageVersionNotes
    GCC 3.4.2C/C++ compiler (Note 3)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 Automake 1.9.2aclocal macro generator (Note 1)
    perl≥5.6.0Nightly tester, utilitiesaclocal macro generator4
    libtool 1.5.10Shared library manager (Note 1)
    CVS≥1.11CVS access to LLVM (Note 4)Shared library manager4
    -

    Notes:

    +

    Notes:

    + +

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

      @@ -462,8 +498,9 @@ href="CFEBuildInstrs.html">try to compile it on your platform.

      LLVM is very demanding of the host C++ compiler, and as such tends to expose bugs in the compiler. In particular, several versions of GCC crash when trying -to compile LLVM. We routinely use GCC 3.3.3 and GCC 3.4.0 and have had success -with them. Other versions of GCC will probably work as well. GCC versions listed +to compile LLVM. We routinely use GCC 3.3.3, 3.4.0, and Apple 4.0.1 +successfully with them (however, see below). Other versions of GCC will +probably work as well. GCC versions listed here are known to not work. If you are using one of these versions, please try to upgrade your GCC to something more recent. If you run into a problem with a version of GCC not listed here, please let @@ -480,6 +517,35 @@ problems in the STL that effectively prevent it from compiling LLVM.

      GCC 3.3.2: This version of GCC suffered from a 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 + 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 + handling is broken in some cases). Please download the FSF 3.3.3 or upgrade + to a newer version of GCC.

      +

      GCC 3.4.x on X86-64/amd64: GCC + miscompiles portions of LLVM.

      +

      IA-64 GCC 4.0.0: The IA-64 version of GCC 4.0.0 is known to + miscompile LLVM.

      +

      Apple Xcode 2.3: GCC crashes when compiling LLVM at -O3 (which is the + default with ENABLE_OPTIMIZED=1. To work around this, build with + "ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2".

      +

      GCC 4.1.1: GCC fails to build LLVM with template concept check errors + compiling some files. At the time of this writing, GCC mainline (4.2) + did not share the problem.

      +

      GCC 4.1.1 on X86-64/amd64: GCC + miscompiles portions of LLVM when compiling llvm itself into 64-bit + code. LLVM will appear to mostly work but will be buggy, e.g. failing + portions of its testsuite.

      +

      GCC 4.1.2 on OpenSUSE: Seg faults during libstdc++ build and on x86_64 +platforms compiling md5.c gets a mangled constant.

      +

      GNU ld 2.16.X. Some 2.16.X versions of the ld linker will produce very +long warning messages complaining that some ".gnu.linkonce.t.*" symbol was +defined in a discarded section. You can safely ignore these messages as they are +erroneous and the linkage is correct. These messages disappear using ld +2.17.

    @@ -520,21 +586,21 @@ All these paths are absolute:

    SRC_ROOT
    This is the top level directory of the LLVM source tree. -

    +

    OBJ_ROOT
    This is the top level directory of the LLVM object tree (i.e. the tree where object files and compiled programs will be placed. It can be the same as SRC_ROOT). -

    +

    LLVMGCCDIR
    This is where the LLVM GCC Front End is installed.

    For the pre-built GCC front end binaries, the LLVMGCCDIR is - cfrontend/platform/llvm-gcc. + llvm-gcc/platform/llvm-gcc. @@ -553,9 +619,10 @@ variables.

    LLVM_LIB_SEARCH_PATH=/path/to/your/bytecode/libs
    [Optional] This environment variable helps LLVM linking tools find the - locations of your bytecode libraries. It is provided only a + locations of your bytecode libraries. It is provided only as a convenience since you can specify the paths using the -L options of the - tools and the C/C++ front-end will use the bytecode files installed in its + tools and the C/C++ front-end will automatically use the bytecode files + installed in its lib directory.
    @@ -582,25 +649,21 @@ compressed with the gzip program.
    Source release for the LLVM libraries and tools.
    llvm-test-x.y.tar.gz
    -
    Source release for the LLVM test suite.
    - -
    cfrontend-x.y.source.tar.gz
    -
    Source release of the GCC front end.
    - -
    cfrontend-x.y.sparc-sun-solaris2.8.tar.gz
    -
    Binary release of the GCC front end for Solaris/Sparc. -
    +
    Source release for the LLVM test suite.
    -
    cfrontend-x.y.i686-redhat-linux-gnu.tar.gz
    -
    Binary release of the GCC front end for Linux/x86.
    +
    llvm-gcc4-x.y.source.tar.gz
    +
    Source release of the llvm-gcc4 front end. See README.LLVM in the root + directory for build instructions.
    -
    cfrontend-x.y.i386-unknown-freebsd5.1.tar.gz
    -
    Binary release of the GCC front end for FreeBSD/x86.
    +
    llvm-gcc4-x.y-platform.tar.gz
    +
    Binary release of the llvm-gcc4 front end for a specific platform.
    -
    cfrontend-x.y.powerpc-apple-darwin7.6.0.tar.gz
    -
    Binary release of the GCC front end for MacOS X/PPC.
    +

    It is also possible to download the sources of the llvm-gcc4 front end from a +read-only subversion mirror at +svn://anonsvn.opensource.apple.com/svn/llvm/trunk.

    + @@ -616,9 +679,9 @@ follows:

    @@ -631,6 +694,11 @@ revision), you can specify a label. The following releases have the following labels: