Compilation Instructions for GHDL
GHDL is a front-end to gcc, so to compile GHDL you also need the gcc source code. GHDL-0.12 (the version on this CD) needs gcc-3.4.0 source, which is also included on this CD.
- Click here to open a tar.gz file containing the gcc-3.4.0 source code.
Unpack the archive to a good location for compiling a LARGE amount of source code. You need lots of free space!
The GHDL code is itself written in Ada95, so you need an Ada compiler as well. For Linux, GNAT will be your best option.
- Most Linux distributions include GNAT. You can problably install it using the normal package installation tools of your distribution.
- Otherwise, install the binaries included on this CD.
Click here to open a tar.gz file containing gnat-3.14p binaries.
Unpack the contents of this archive to a temporary location, and follow the instructions in the README file. You just have to run a few scripts.
Assuming you have both the gcc-3.4.0 source code and GNAT ready to go, here is the procedure:
- Untar the gcc source code:
% tar zxf gcc-3.4.0.tar.gz
- Untar the ghdl source code:
% tar zxf ghdl-0.12.tar.gz
- You now have two directories: one containing the GHDL source and one containing the gcc source. Move the 'vhdl' subdirectory of the GHDL source code into the 'gcc' subdirectory of the gcc source code:
% mv ghdl-0.12/vhdl gcc-3.4.0/gcc
- Enter the gcc source directory and configure gcc with VHDL language enabled:
% cd gcc-3.4.0
% ./configure --enable-languages=vhdl
Of course, you can enable other languages and use other configuration options. Refer to the gcc documentation for help on this.
- Compile gcc:
% make
- Install gcc:
% make install
NOTE!
The procedure above creates a new version of gcc that only compiles VHDL. If you replace your original gcc version with this, you may loose the ability to compile C, C++, etc. programs! Make sure you either
- Enable other languages as well (e.g. --enable-languages=vhdl,c,c++), or
- Install your new VHDL-only version in a different location from your original gcc version
(e.g. --prefix=/home/myname/ghdl).