Compilers have a compile target that determines what architecture's object code will be produced. Way back in the dark ages, development toolchains were a one-architecture-per-compiler-binary affair, where the compiler and linker produced one kind of result. That changed when GCC was restructured so an installation on one architecture could cross-compile to any other that was supported. GCC adopted the -m
(for machine) switch to specify this parameter.
Being part of the same toolchain, the same switch was carried to the linker. Instead of determining machine architecture, -m
determines what executable format (among other things) will be produced from the objects and libraries being linked. While the world was making the transition from COFF to ELF, it wasn't unusual to need to link into one or the other without having to build a separate machine to do it. Normally, you set several switches to make the linker produce a file for a given system; since -m
in GNU ld serves approximately the same purpose as in GCC, that's why it was used.
Machine architecture isn't the right term since executable formats aren't necessarily machine-architecture-specific. If I had to take a guess at how the documentation got where it did, it would be that someone noticed this, tried to backfit something that began with M, couldn't find anything that would work and decided to go with eMulation.
other aspects of the target system
What system (I guess OS?) and what information?Sample values:
hp300bsd',mipslit',
sun4'.` When do I use which, and how do I find out which to use?