### First - if you just want to grab a statically linked gdbserver for a specific MIPS(EL) or ARM platform ...
Check out https://github.com/mzpqnxow/arm-mips-tools as it contains a substantial collection of gdbserver binaries that have been well tested on many different architectures of varying ABIs, byte-orders and CPU architectures. Why build when you can borrow or steal, right? They aren't backdoored :)
### First - If you just want to build a native gdb-7.12 gdbserver statically
You don't need any of this. These scripts just simplify doing it with different toolchains. If you're doing it natively it can be summarized pretty quickly
$ make -j gdbserver GDBSERVER_LIBS="/path/to/libstdc++.a /path/to/libgcc_eh.a"
```
You will have a statically compiled GDB 7.12 gdbserver for your native OS. Read on for the cross-compile stuff.
### Use an env script with a pre-built OpenWrt Toolchain
Browse to https://downloads.openwrt.org/snapshots/trunk/ to find your toolchain
To use this script, assume you have a directory called /toolchains/ and that this is where you will keep the toolchains, one subdirectory per toolchain. You're a maniac- you're hoarding toolchains and probably up to no good.
To get a new toolchain up in such a way to use active-openwrt-toolchain, grab a file like OpenWrt-Toolchain-brcm63xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
```
$ cd ~/ && git clone https://github.com/mzpqnxow/gdb-7.12-crossbuilder
### Use an env script with an installed toolchain built by musl-cross-make
Using musl-cross-make is a nice experience- I recommend you try it. If you do, all you need to do is edit config.mak, use make -j and make install. That's it. You're done. The activate-musl-toolchain file is for you to place in the root of the installed toolchain to use as a convenience to "activate" the toolchain in your environment.
gdbserver: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped
```
### Capabilities provided
See the end of each .env file. You will see variables exported. Those variables can now be accessed in your shell while building software. Tools like gcc, ar, ld, g++, etc. will also now be in your path and there will be a ```cross_configure``` alias in the shell to simplify using software packages that utilize ./configure build systems
#### Sample environment variables after activating an OpenWrt toolchain