Anonymous user
Why do I need a Cross Compiler?: Difference between revisions
Why do I need a Cross Compiler? (view source)
Revision as of 10:48, 30 September 2010
, 13 years ago→What are the basics of cross compiling?
[unchecked revision] | [unchecked revision] |
(Made this section even easier to understand.) |
|||
Line 11:
In the example, you must then, have a sparc32-elf-unix4 cross compiler, which can run on the i686-elf-yourBuildOs machine, and spit out (target) your host machine. A cross compiler is usually named after the host it targets, and not after the host it runs on, so by looking at the name of a compiler, you can usually tell what machine it targets.
The "target" only matters
For most software, like a text editor, if you're compiling it, you only need to specify host (and usually not even that). Specifying a host causes the software to be built using a compiler on the build machine which is a cross compiler that targets that host. This way, since the software was compiled using that host's targeting cross compiler, the software will be able to run on that host, even though it was built on a (potentially) different built machine.
|