From cdd6bae9eb68cced9a23855329b29b9a8c389e86 Mon Sep 17 00:00:00 2001 From: Sadoon Albader Date: Sun, 27 Aug 2023 16:24:31 +0300 Subject: [PATCH] support building gdb on ppc64le host --- ppc64-gdb-gcc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ppc64-gdb-gcc b/ppc64-gdb-gcc index 5f2ca95..66d6c6e 100755 --- a/ppc64-gdb-gcc +++ b/ppc64-gdb-gcc @@ -4,10 +4,14 @@ if [ "$EUID" -ne 0 ] 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! @@ -21,7 +25,10 @@ tar -xvzf gdb-8.3.tar.gz 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 -- 2.30.2