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

wget https://ftp.gnu.org/gnu/gdb/gdb-11.2.tar.xz
wget https://www.linuxfromscratch.org/patches/blfs/svn/gdb-11.2-upstream_fixes-1.patch

cd gdb-11.2

patch -Np1 -i ../gdb-11.2-upstream_fixes-1.patch

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

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 [11m 35.59s]
sudo make -C gdb install
