tce-load -i compiletc mpc-dev readline-dev texinfo isl-dev

wget https://ftp.gnu.org/gnu/gdb/gdb-13.2.tar.xz

cd gdb-13.2

sudo ln -s /tmp/tcloop/ncursesw-dev/usr/local/include/ncursesw/* /usr/local/include

mkdir build
cd build

CC="gcc -flto -mtune=generic -Os -pipe" CXX="g++ -flto -mtune=generic -Os -pipe" ../configure --prefix=/usr/local --localstatedir=/var --with-system-readline --with-python=/usr/local/bin/python3

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;
find . -name Makefile -type f -exec sed -i 's/-O2 -g//g' {} \;

make [15m 57.41s]
sudo make -C gdb install
sudo make -C gdbserver install
