1 # Installation instructions for GHDL
3 ## Setting up new debootstrap and chroot into it
5 Run the following if you wish to isolate the ghdl build
6 from other software (reproducible builds) or use the schroot
7 auto-preparation script here:
8 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD>
10 export MY_CHROOT=/stable-chroot
12 debootstrap stable $MY_CHROOT http://deb.debian.org/debian/
13 mount -t proc proc $MY_CHROOT/proc
14 mount -t sysfs sysfs $MY_CHROOT/sys
15 mount -t devpts devpts $MY_CHROOT/dev/pts/
16 chroot $MY_CHROOT /bin/bash
18 ## Steps to compile GHDL
20 ### Necessary software to install
22 apt-get install git gnat gcc make g++ file texinfo zlib1g-dev
24 git clone https://github.com/ghdl/ghdl.git
25 wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
26 wget https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz
27 wget https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz
28 wget https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
29 wget https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz
33 tar -xf gcc-10.3.0.tar.xz
35 tar -xf ../gmp-6.2.1.tar.xz
37 tar -xf ../mpc-1.2.1.tar.gz
39 tar -xf ../mpfr-4.1.0.tar.xz
41 tar -xf ../isl-0.18.tar.bz2
49 ../configure --with-gcc=../../gcc-10.3.0 --prefix=/usr/local/ghdl
51 mkdir gcc-objs; cd gcc-objs
52 ../../../gcc-10.3.0/configure --prefix=/usr/local/ghdl \
53 --enable-languages=c,vhdl --disable-bootstrap --disable-lto \
54 --disable-multilib --disable-libssp --disable-libgomp \
55 --disable-libquadmath --enable-default-pie
62 Please adjust the install paths for ghdl.
64 ### Installing ghdl, yosys, and ghdl-yosys-plugin in a Debian chroot
66 Verified to work on a Talos II workstation (Debian Bullseye)
68 debootstrap bullseye /var/chroot/bullseye_ghdl
69 chroot /var/chroot/bullseye_ghdl
71 put some 'deb-src' URIs in your sources.list
75 apt-get build-dep ghdl
78 git clone https://github.com/ghdl/ghdl
80 ./configure --with-llvm-config
85 apt-get build-dep yosys
86 git clone https://github.com/YosysHQ/yosys
91 git clone https://github.com/ghdl/ghdl-yosys-plugin
96 [optional] apt-get install verilator
97 exit # exit the chroot
99 Then install schroot and create a config file
100 nano /etc/schroot/chroot.d/bullseye_ghdl
105 directory=/var/chroot/bullseye_ghdl
108 After installing ghdl-yosys-plugin you can build [[microwatt]]