fix broken build on ppc64le
[dev-env-setup.git] / hdl-tools-yosys
1 #!/bin/bash
2 if [ "$EUID" -ne 0 ]
3 then echo "Please run as root using 'sudo bash'"
4 exit
5 fi
6
7 # this is a bit of a cheat, by relying on debian to pull in all the
8 # build dependencies. saves time researching how to get and list them
9 # by hand.
10 apt-get update -y
11 apt-get build-dep yosys -y
12 apt-get remove yosys -y
13 apt-get build-dep ghdl -y
14
15 mkdir -p /home/$SUDO_USER/src
16 cd /home/$SUDO_USER/src
17 mkdir -p hdl_tools
18 cd hdl_tools
19
20 git clone https://github.com/YosysHQ/yosys.git
21 git clone https://github.com/YosysHQ/SymbiYosys.git sby
22 git clone https://github.com/SRI-CSL/yices2.git
23 git clone https://github.com/Z3Prover/z3.git
24 git clone https://github.com/ghdl/ghdl
25 git clone https://github.com/ghdl/ghdl-yosys-plugin
26
27 cd yosys
28 make config-clang
29 make -j$(nproc)
30 make install
31
32 cd ../ghdl
33 ./configure --with-llvm-config
34 make
35 make install
36
37 cd ../ghdl-yosys-plugin
38 make
39 make install
40
41 cd ../sby
42 make install
43
44 cd ../yices2
45 autoconf
46 ./configure
47 make -j$(nproc)
48 make install
49
50 cd ../z3
51 python scripts/mk_make.py
52 cd build
53 make -j$(nproc)
54 make install
55
56 cd /home/$SUDO_USER/src/hdl_tools
57 chown -R $SUDO_USER .
58 chgrp -R $SUDO_USER .