tce-load -i compiletc perl5 python3.6

cd glibc-2.30

patch -Np1 -i ../glibc-2.30-fhs-1.patch

patch -Np1 -i ../glibc-uclibc-compat-ld-cache.patch

sed -i '/asm.socket.h/a# include <linux/sockios.h>' sysdeps/unix/sysv/linux/bits/socket.h

mkdir build
cd build

CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ../configure --prefix=/usr --disable-werror --libexecdir=/usr/lib/glibc --enable-kernel=4.19.10 --enable-stack-protector=strong --with-headers=/usr/include libc_cv_slibdir=/lib --enable-obsolete-rpc

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

make [8m 49.28s]

touch /etc/ld.so.conf

sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile

sudo make install [install_root=/tmp/pkg]
