STATIC BUILD: GDBSERVER ====================================================== PREPARE Adjust as required. $ export TARGET="mipsel-linux-musl" $ export PREFIX="${HOME}/${TARGET}-static" $ LOCATION="https://ftp.gnu.org/gnu/gdb/" $ VERSION="17.2" $ PKG="gdb-${VERSION}.tar.xz" $ SIG="${PKG}.sig" $ KEY="F40ADB902B24264AA42E50BF92EDB04BFF325CF3" $ KEYSERVER="hkps://keyserver.ubuntu.com" DOWNLOAD $ wget "${LOCATION}/${PKG}" "${LOCATION}/${SIG}" VERIFY $ gpg --keyserver "$KEYSERVER" --recv-keys "$KEY" $ gpg --verify "$SIG" "$PKG" EXTRACT $ tar -xJf "$PKG" $ cd gdb-${VERSION} PATCH $ sed -i -e 's/$MISSING makeinfo/true/g' configure $ sed -i -e "s/RDYNAMIC=['\"].*['\"]/RDYNAMIC=''/g" gdbserver/configure $ sed -i -e 's/^CC_LD.*$/& -static/g' gdbserver/Makefile.in BUILD $ mkdir build/gdbserver $ cd build/gdbserver $ ../../configure --host="$TARGET" --prefix="$PREFIX" \ --disable-gdb --disable-sim --disable-nls \ --disable-source-highlight $ make all-gdbserver $ "${TARGET}-strip" gdbserver/{gdbreplay,gdbserver} $ make install-gdbserver ==================================================== https://risingedge.co.za/