- Log in, update the packages in the VM
- Do a bunch of bind mounts and switch to a 32bit chroot with linux32 chroot /usr/i686-pc-linux-gnu /bin/bash --login
- Run emerge world -DNu in the chroot. This builds binpkgs and stores them on a NFS mount.
- Fire up tyr-staging VM which runs a 32bit system
- Update the staging system from the binpkgs on the NFS mount
- Check that everything works
- Log in to the physical 32bit Pentium 4 machine tyr
- Update the physical machine via the same binpkgs
In the 32bit build chroot, I have:
Code: Select all
(chroot)tyr-cross-master / # emerge --info
Portage 3.0.66.1 (python 3.13.0-final-0, default/linux/x86/23.0/i686, gcc-14, glibc-2.40-r5, 6.6.62-gentoo-kvm i686)
=================================================================
System uname: Linux-6.6.62-gentoo-kvm-i686-Intel_Xeon_Processor_-Skylake,_IBRS-with-glibc2.40
...
CBUILD="i686-pc-linux-gnu"
CFLAGS="-m32 -march=pentium4 -O3 -pipe -fomit-frame-pointer -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin"
CHOST="i686-pc-linux-gnu"
In the staging VM:
Code: Select all
tyr-staging ~ # emerge --info
Portage 3.0.66.1 (python 3.13.0-final-0, default/linux/x86/23.0/i686, gcc-13, glibc-2.40-r5, 6.6.62-gentoo-tyr-staging i686)
=================================================================
System uname: Linux-6.6.62-gentoo-tyr-staging-i686-Intel_Xeon_Processor_-Skylake,_IBRS-with-glibc2.40
...
CBUILD="i686-pc-linux-gnu"
CFLAGS="-m32 -O3 -march=pentium4 -pipe -fomit-frame-pointer -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=1 -fuse-linker-plugin"
CHOST="i686-pc-linux-gnu"
The real Pentium 4 hardware, after glibc-2.40-r5 was installed:
Code: Select all
tyr /home/mame # emerge --info
Portage 3.0.65 (python 3.12.6-final-0, default/linux/x86/23.0/i686, gcc-13, glibc-2.40-r5, 6.6.52-gentoo-mame i686)
=================================================================
System uname: Linux-6.6.52-gentoo-mame-i686-with-glibc2.40
...
CBUILD="i686-pc-linux-gnu"
CFLAGS="-m32 -O3 -march=pentium4 -pipe -fomit-frame-pointer -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=1 -fuse-linker-plugin"
CHOST="i686-pc-linux-gnu"
Checking ld.so --help:
Code: Select all
# ld.so --help
...
This program interpreter self-identifies as: /lib/ld-linux.so.2
Shared library search path:
(libraries located via /etc/ld.so.cache)
/lib (system search path)
/usr/lib (system search path)
No subdirectories of glibc-hwcaps directories are searched.
Looking at libc.so.6:
Code: Select all
(chroot)tyr-cross-master / # readelf -n /lib/libc.so.6
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA needed: x86-64-baseline
x86 feature used: x86, x87, XMM
x86 ISA used: x86-64-baseline
Displaying notes found in: .note.ABI-tag
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
OS: Linux, ABI: 3.2.0
What's wrong with my glibc-2.40-r5 build? How do I build it properly so that it would work on the 32bit hardware as did the earlier versions?

