From: Luke Kenneth Casson Leighton Date: Thu, 4 Mar 2021 21:50:28 +0000 (+0000) Subject: first revision ppc64-gdb-gcc script X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d26f6cdc18d92b31cad1467aea9e14c16dacb607;p=dev-env-setup.git first revision ppc64-gdb-gcc script --- diff --git a/ppc64-gdb-gcc b/ppc64-gdb-gcc new file mode 100755 index 0000000..bbf4b27 --- /dev/null +++ b/ppc64-gdb-gcc @@ -0,0 +1,26 @@ +#!/bin/bash +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + +# first install powerpc64 gcc-8 cross-compiler +apt-get install gcc-8-powerpc64-linux-gnu + +runuser $SUDO_USER --preserve-environment -c ' +cd /home/$SUDO_USER +mkdir -p src +cd src +wget https://ftp.gnu.org/gnu/gdb/gdb-8.3.tar.gz -O gdb-8.3.tar.gz +tar -xvzf gdb-8.3.tar.gz +cd gdb-8.3 +mkdir build +cd build +./configure --srcdir=.. --host=x86_64-linux --target=powerpc64-linux-gnu +make +' +cd /home/$SUDO_USER/src/gdb-8.3/build +make -n install +echo -e " +\e[1;91mCross-compiled GDB 8.3 and compiler now installed.\e[0m +"