diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index b6a710dec7c..bda0cf8f3ce 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -54,7 +54,6 @@
  • An Example Using the LLVM Tool Chain
    1. Example with llvm-gcc4
    2. -
    3. Example with llvm-gcc3
  • Common Problems
  • Links @@ -648,12 +647,6 @@ compressed with the gzip program.
    llvm-test-x.y.tar.gz
    Source release for the LLVM test suite.
    -
    llvm-gcc3.4-x.y.source.tar.gz
    -
    Source release of the LLVM GCC 3.4 front end.
    - -
    llvm-gcc3.4-x.y-platform.tar.gz
    -
    Binary release of the LLVM GCC 3.4 for a specific platform.
    -
    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.
    @@ -750,11 +743,6 @@ location must be specified when the LLVM suite is configured.

    -
  • -

    Next, you will need to fix your system header files (llvm-gcc3.4 only):

    - -

    cd llvm-gcc3.4/platform
    - ./fixheaders

    -

    The binary versions of the GCC front end may not suit all of your needs. For example, the binary distribution may include an old version of a system header file, not "fix" a header file that needs to be fixed for GCC, or it may be @@ -1504,8 +1492,8 @@ are code generators for parts of LLVM infrastructure.

    -

    This section gives an example of using LLVM. Since we are currently -transitioning from llvm-gcc3 to llvm-gcc4, we include examples for both. +

    This section gives an example of using LLVM. llvm-gcc3 is now obsolete, +so we only include instructiosn for llvm-gcc4.

    Note: The gcc4 frontend's invocation is considerably different @@ -1588,66 +1576,6 @@ output.

    - -
    Example with llvm-gcc3
    - -
    - -
      -
    1. First, create a simple C file, name it 'hello.c': -
      -   #include <stdio.h>
      -   int main() {
      -     printf("hello world\n");
      -     return 0;
      -   }
      -       
    2. - -
    3. Next, compile the C file into a LLVM bytecode file:

      -

      % llvm-gcc hello.c -o hello

      - -

      Note that you should have already built the tools and they have to be - in your path, at least gccas and gccld.

      - -

      This will create two result files: hello and - hello.bc. The hello.bc is the LLVM bytecode that - corresponds the the compiled program and the library facilities that it - required. hello is a simple shell script that runs the bytecode - file with lli, making the result directly executable. Note that - all LLVM optimizations are enabled by default, so there is no need for a - "-O3" switch.

    4. - -
    5. Run the program. To make sure the program ran, execute one of the - following commands:

      - -

      % ./hello

      - -

      or

      - -

      % lli hello.bc

    6. - -
    7. Use the llvm-dis utility to take a look at the LLVM assembly - code:

      - -

      % llvm-dis < hello.bc | less

    8. - -
    9. Compile the program to native assembly using the LLC code - generator:

      - -

      % llc hello.bc -o hello.s

      - -
    10. Assemble the native assembly language file into a program:

      - -

      Solaris:% /opt/SUNWspro/bin/cc -xarch=v9 hello.s -o hello.native

      -

      Others:% gcc hello.s -o hello.native

      - -
    11. Execute the native code program:

      - -

      % ./hello.native

    12. - -
    - -