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.

The GHDL code is itself written in Ada95, so you need an Ada compiler as well. For Linux, GNAT will be your best option.

Assuming you have both the gcc-3.4.0 source code and GNAT ready to go, here is the procedure:

  1. Untar the gcc source code:
        % tar zxf gcc-3.4.0.tar.gz
  2. Untar the ghdl source code:
        % tar zxf ghdl-0.12.tar.gz
  3. 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
  4. 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.
  5. Compile gcc:
        % make
  6. 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

  1. Enable other languages as well (e.g. --enable-languages=vhdl,c,c++), or
  2. Install your new VHDL-only version in a different location from your original gcc version
    (e.g. --prefix=/home/myname/ghdl).