Example for debian
apt install -y \
build-essential \
autoconf \
automake \
bison \
diffutils \
flex \
gawk \
git \
gperf \
help2man \
libncurses-dev \
libtool-bin \
make \
patch \
python-dev \
texinfo \
unzip \
wget \
xz-utils
To clone including git submodules, clone the repo likes this
git clone --recursive https://github.com/tuxuser/xenon_toolchain-ng
cd xenon_toolchain-ng/
cd crosstool-ng/
./bootstrap
./configure --enable-local
make
cd ..
cp ct-ng_config .config
./crosstool-ng/ct-ng build