#!/bin/env bash set -e PATH=/opt/bootstrap/bin:/opt/toolchain/bin:$PATH mkdir -p /toolchain/gdb/.build && cd /toolchain/gdb tar xf /downloads/gdb-$GDB_VERSION.tar.xz cd .build ../gdb-$GDB_VERSION/configure \ --prefix=/opt/toolchain \ --target=$TARGET \ --disable-nls \ --disable-werror \ --with-gmp=$STATIC_DEPS_PREFIX \ --with-mpfr=$STATIC_DEPS_PREFIX \ --with-python=no \ --with-expat=yes \ --with-zlib=yes \ CPPFLAGS="-I$STATIC_DEPS_PREFIX/include -I$STATIC_DEPS_PREFIX/include/ncursesw" \ LDFLAGS="-L$STATIC_DEPS_PREFIX/lib" make -j$(nproc) all-gdb make install-strip-gdb