check out specific version of yosys needed for ls180 build
[dev-env-setup.git] / ppc64-gdb-gcc
1 #!/bin/bash
2 if [ "$EUID" -ne 0 ]
3 then echo "Please run as root"
4 exit
5 fi
6
7 # first install powerpc64 gcc-8 cross-compiler
8 apt-get install gcc-8-powerpc64-linux-gnu
9
10 # it your responsibility to check that the archive downloaded below is
11 # uncompromised!
12
13 runuser $SUDO_USER --preserve-environment -c '
14 cd /home/$SUDO_USER
15 mkdir -p src
16 cd src
17 wget https://ftp.gnu.org/gnu/gdb/gdb-8.3.tar.gz -O gdb-8.3.tar.gz
18 tar -xvzf gdb-8.3.tar.gz
19 cd gdb-8.3
20 mkdir -p build
21 cd build
22 ../configure --srcdir=.. --host=x86_64-linux --target=powerpc64-linux-gnu
23 make
24 '
25 cd /home/$SUDO_USER/src/gdb-8.3/build
26 make install
27 echo -e "
28 \e[1;91mCross-compiled GDB 8.3 and compiler now installed.\e[0m
29 "