KERNEL-HEADERS
make mrproper
make menuconfig … save .config
make headers
mkdir /pp/usr
and then
make ARCH=x86 INSTALL_HDR_PATH=/pp/usr headers_install
GLIBC
mkdir bb && cd bb && ../configure –prefix=/usr
make DESTDIR=/pp install
Now we want to go with builds with libc dependences
linux-vdso.so.1 (0x00007ffca79d6000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2ca01fd000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2ca0025000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2ca02de000)
glibc-2.38 does not install crypt.h and gcc build fails, but it is in include/crypt and needs to be installed by you.
Build from the system without libiconv. iconv is taken care of by GLIBC.
/lib64/libc.so.6: version `GLIBC_2.x not found failure
Installed GLIBC version is x > x+4