|
|||
|---|---|---|---|
| Home News Documentation Installation Wiki Bug Database Source Repository Contact |
The installation
procedure for ELLCC is a bit complicated at the moment. There are
currently no binary downloads available, you have to build from source.
Having said that, here are step by step instructions that describe how
to build ELLCC under Linux. These instructions also work under Cygwin. It takes a long time to build ELLCC. It helps to have a system with at least 3GB of RAM to speed up the LLVM build. PrerequisitesAn ELLCC build requires the following packages to be installed:
/usr/include/FlexLexer.h.
The current work-around is edit /usr/include/FlexLexer.h
(as superuser) and change the line
Create the Build DirectoryCreate a directory to build in. In the examples below, I use "ecc".
Make the directory and get the ELLCC sources:
[~]
main% mkdir ecc[~] main% cd eccBuilding LLVMGet the ELLCC version of LLVM:[~/ecc]
main% svn co http://ellcc.org/svn/llvm/trunk llvm[~/ecc] main% mkdir llvm-build[~/ecc] main% cd llvm-build[~/ecc/llvm-build] main% ../llvm/configure
--prefix=`pwd`/../ellcc --prefix
option sets the installation directory of this build of LLVM to the
directory ellcc.Next, build and install LLVM: [~/ecc/llvm-build]
main% make[~/ecc/llvm-build] main% make install
[~/ecc/llvm-build] main% cd ..
[~/ecc] main%
Building eccThe next step is to build the ecc compiler. Build the ELLCC sources:[~/ecc] main% cd ellcc
[~/ecc/ellcc] main%
[~/ecc/ellcc] main%
./configure
[~/ecc/ellcc] main% make
[~/ecc/ellcc] main% ls binalpha-elf-e++@
lli*
llvm-ld*
msp430-elf-e++@
powerpc-elf-ecc@ x86-elf-e++@alpha-elf-ecc@
llvm-ar*
llvm-link*
msp430-elf-ecc@
sparc-elf-e++@ x86-elf-ecc@arm-elf-e++@
llvm-as*
llvm-nm*
nios2-elf-e++@
sparc-elf-ecc@ x86-pe-e++@arm-elf-ecc@
llvm-bcanalyzer*
llvm-prof*
nios2-elf-ecc@
spu-elf-e++@
x86-pe-ecc@bugpoint*
llvmc*
llvm-ranlib*
opt*
spu-elf-ecc@e++@
llvm-config*
llvm-stub*
powerpc64-elf-e++@ tblgen*ecc*
llvm-dis*
mips-elf-e++@ powerpc64-elf-ecc@ x86_64-elf-e++@llc*
llvm-extract*
mips-elf-ecc@ powerpc-elf-e++@
x86_64-elf-ecc@Some of the executables are as a result of building LLVM, but building ecc created the ecc executable and many symbolic links to it. You may when to put the bin directory in your PATH, but it is not required at this point. ecc and e++ are the hosted C and C++ compilers: They use the system header files in /usr/include and use the system cc and c++ compilers to do the final program link so that the system startup code and libraries are used. This means you can use ecc and e++ to compile programs that run natively on your system. The symbolic links to ecc set up defaults that cause it to target a specific processor and target environment. We'll see how to use them in Setting Up Target Support. |
||