Building GHDL from Sources


GHDL can be downloaded as a zip-file/tar-file (latest ‘master’ branch) or cloned with git clone from GitHub. GitHub offers HTTPS and SSH as transfer protocols. See the Downloading Source Files page for further details. The installation directory is referred to as GHDLRoot.

Available back-ends

GHDL currently supports three different back-ends (code generators):

Here is a short comparison, so that you can choose the one you want to use:

Back-end Pros Cons
  • Very easy to build
  • Very quick analysis
  • Can handle very large designs
  • Simulation is slower
  • x86_64/i386 only
  • Generated code is faster
  • Generated code can be debugged (with -g)
  • Easier to build than GCC
  • Build is more complex
  • Generated code is faster (particularly with -O or -O2)
  • Generated code can be debugged (with -g)
  • Ported to many platforms (x86, x86_64, PowerPC, SPARC)
  • Build is even more complex
  • Analysis can take time (particularly for large units)
  • Code coverage collection (gcov) is unique to GCC


The output of both GCC and LLVM is an executable file, but mcode does not generate any. Therefore, if using GCC/LLVM, the call with argument -r can be replaced with direct execution of the binary. See section Quick Start Guide.

After making your choice, you can jump to the corresponding section. However, we suggest you to read Directory Structure first, so that you know where the content will be placed and which files are expected to be created.


Since GHDL is written in Ada, independently of the code generator you use, the GNU Ada compiler, GNAT GPL, is required, 2014 (or later) for x86 (32 or 64 bit). GNAT GPL can be downloaded anonymously from Then, untar and run the doinstall script. Alternatively, most GNU/Linux provide a package named gcc-ada or gcc-gnat.


In these instructions, the configure script is executed in the source directory; but you can execute in a different directory too, like this:

$ mkdir ghdl-objs
$ cd ghdl-objs
$ ../path/to/ghdl/configure ...