Building LLVM and the LLVM GCC 4 Frontend

Installing Cygwin

Make sure you have the latest Cygwin release.

Here's the directory tree :-
    /home/ang/svn/llvm
    /home/ang/svn/llvm-gcc

    /home/ang/build/llvm
    /home/ang/build/llvm-gcc

    /home/ang/llvm
    /home/ang/llvm-gcc

Getting the source from CVS

Get LLVM :-
    cd /home/ang/svn
    svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm 
Get the LLVM GCC 4.2 frontend :-
    svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk llvm-gcc

Build instructions


Save the path.
    ROOTPATH=${PATH}

Debug build

Build the tools
    cd /home/ang/build/llvm
    /home/ang/svn/llvm/configure --prefix=/home/ang/llvm
    make tools-only
    PATH=/home/ang/build/llvm/debug/bin:${PATH}
Build and install the frontend.
    cd /home/ang/build/llvm-gcc
    /home/ang/svn/llvm-gcc/configure --prefix=/home/ang/llvm-gcc --disable-threads --disable-nls --disable-shared --enable-languages=c,c++ --disable-c-mbchar --program-prefix=llvm- --enable-llvm=/home/ang/build/llvm
    make all
    make install
    PATH=/home/ang/llvm-gcc/bin:${PATH}
Rebuild and install the LLVM.
    cd /home/ang/build/llvm
    make
    make install
Reset the path
    PATH=/home/ang/llvm-gcc/bin:/home/ang/llvm/bin:${ROOTPATH}
    make check
Should result in the following :-
    # of expected passes            1620
    # of unexpected failures        136
    # of unexpected successes       1
    # of expected failures          19
Or there abouts.

Test suite

    PATH=/home/ang/llvm-gcc/bin:/home/ang/llvm/bin:${ROOTPATH}
    cd /home/ang/svn/llvm/projects
    svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
    cd /home/ang/build/llvm
    /home/ang/svn/llvm/configure --prefix=/home/ang/llvm
    cd /home/ang/build/llvm/projects/test-suite
    make
Please email any mistakes, error, mods, or suggestions to aaronngray@gmail.com