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 @@
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.
- #include <stdio.h> - int main() { - printf("hello world\n"); - return 0; - } -
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.
Run the program. To make sure the program ran, execute one of the - following commands:
- -% ./hello
- -or
- -% lli hello.bc
Use the llvm-dis utility to take a look at the LLVM assembly - code:
- -% llvm-dis < hello.bc | less
Compile the program to native assembly using the LLC code - generator:
- -% llc hello.bc -o hello.s
- -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
- -Execute the native code program:
- -% ./hello.native