It is being developed for different operating systems of different digits. Working OS - ArchLinux x64. Due to the unwillingness to use virtual machines, it was decided to create virtual environments with a minimum number of system elements under which development is being conducted. In addition, in order to be able to use the latest compiler, I move my gcc / g ++ binaries to the appropriate folder (for example, / mnt / testOS1 / bin, / mnt / testOS1 / usr / bin ...). This is followed by chroot, then build and run.
All anything, but when the target system is x32, problems begin. Despite the fact that I put gcc-multilib, the gcc / g ++ binary itself has x64 digits and looks for corresponding libraries (libc and libm) for its launch, otherwise it gives ... wrong ELF class: ELFCLASS32. It is obviously impossible to change libraries, so that the whole system does not go.
By solving the problem with the given initial conditions, I see an indication of the paths to these libraries of the required width at the time of launch of g ++. Is it possible?
In addition, I would like to hear other, more correct, options for implementing such a development system.