For instance, I would like to make on Linux 64-bit executable for 64/32-bit Linux, Windows and Mac. But all this seems quite messy if I need to change all before any compilation...
Changes all what ?
You do it once and then, in you code, have #ifdef around platform specific code.
By the way, I never managed to get Linux->Mac to work. But have not tried for some time....
And, my cross compile machine is a VM, it builds Linux (32 and 65), Windows (32 and 64), Armhf and AppImages. GTK2, Qt5, Qt6, WIn23. By having it as a standalone, rarely changing box, I don't need to worry about the day to day fiddling causing unexpected problems. Its an U2004 machine so it avoids the glibc problem.
Davo