Simply compiling with gcc on a single architecture (no cross compile) requires more than one binary. In my experience (20 years of embedded work), cross compiling is hard not because of the compiling, but because of the linking. The linker has to know where all your target architecture libraries are so it can link your executable.
That said, this is getting easier and easier to do. I think this is because debian packages have to be architecture specific just for Intel architectures now, to handle both x86 (32 bit) and x86_64 ISAs. Once you have the environment, creating and using a different compiler executable is the easy part.
That said, this is getting easier and easier to do. I think this is because debian packages have to be architecture specific just for Intel architectures now, to handle both x86 (32 bit) and x86_64 ISAs. Once you have the environment, creating and using a different compiler executable is the easy part.