GCC Cross-Compiler: Difference between revisions
Jump to navigation
Jump to search
convert first- and second- person pronouns
[unchecked revision] | [unchecked revision] |
(Fix spelling error) |
(convert first- and second- person pronouns) |
||
Line 1:
{{FirstPerson}}
{{rating|1}}
This tutorial focuses on creating a GCC cross-compiler for your own operating system. This compiler that we build here will have a generic target (i686-elf)
== Introduction ==
Generally speaking, a cross-compiler is a compiler that runs on platform A (the '''host'''), but generates executables for platform B (the '''target'''). These two platforms may (but do not need to) differ in CPU, operating system, and/or [[:Category:Executable Formats|executable format]]. In our case, the host platform is your current operating system and the target platform is the operating system you are about to make. It is important to realize that these two platforms are not the same; the operating system you are developing is always going to be different from the operating system you currently use
=== Why cross-compilers are necessary ===
{{Main|Why do I need a Cross Compiler?}}
=== Which compiler version to choose ===
{{Main|Building GCC}}
The newest [[GCC]] is recommended as it is the latest and greatest release. For instance,
You can also use older releases as they are usually reasonably good. If your local system compiler isn't too terribly old (at least GCC 4.6.0), you may wish to save yourself the trouble and just pick the latest minor release (such as 4.6.3 if your system compiler is 4.6.1) for your cross-compiler.
<source lang="bash">gcc --version</source>
Line 27:
=== Which binutils version to choose ===
{{Main|Cross-Compiler Successful Builds}}
<source lang="bash">ld --version</source>
|