exit
fi
-# first install powerpc64 gcc-8 cross-compiler
-apt-get -y install gcc-8-powerpc64-linux-gnu \
- gcc-powerpc64-linux-gnu \
- wget texinfo
+# first install powerpc64 gcc-8 cross-compiler if not on ppc64le
+if $(uname -m) != "ppc64le"; then
+ apt-get -y install gcc-8-powerpc64-linux-gnu \
+ gcc-powerpc64-linux-gnu \
+ wget texinfo
+else
+ apt-get -y install gcc-8 gcc wget texinfo
+fi
# it your responsibility to check that the archive downloaded below is
# uncompromised!
cd gdb-8.3
mkdir -p build
cd build
-../configure --srcdir=.. --host=x86_64-linux --target=powerpc64-linux-gnu
+if $(uname -m) != "ppc64le; then
+ ../configure --srcdir=.. --host=x86_64-linux --target=powerpc64-linux-gnu
+else
+ ../configure --srcdir=.. --target=powerpc64-linux-gnu
make
'
cd /home/$SUDO_USER/src/gdb-8.3/build