Architecture is just an option in the debian package configuration file. By default, it uses uname commands. You can override it, but there is an easier way.
In general, most 32-bit programs work fine on 64-bit ones. However, if you do not have a very old PC, it is also very easy to install the mini 64-bit debian in the virtual machine virtual machine. You probably only need the base + built-in libraries + dev. It does not take up much disk space. If you can free up 2G disk space, just install the debian desktop.
There are more options for cross-compiling with varying degrees of automation.
I use the virtualbox method regularly. It is quick and easy.
If you are running 64-bit Linux, creating a 32-bit environment is as simple as mkdebootstrap + linux32 + chroot.
source share