Cross-Compiler Successful Builds

From OSDev.wiki
Revision as of 09:19, 15 February 2010 by osdev>Aj (Copy from GCC Cross-Compiler in order to play with table layouts)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Tested on...

The numbers refer to the versions being built, not the host compiler doing the build.

There have been successful builds with older versions, but some problems as well. Mention of their specifics has been removed to keep this tutorial short; please use up-to-date software.

This has been tested to work with the below combinations of binutils and gcc:

GCC 3.4.3 3.4.4 3.4.5 3.4.6 4.0.0 4.0.1 4.0.2 4.0.3 4.1.1 4.1.2 4.2.0 4.2.1 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.4.0 4.4.1 4.4.2 4.4.3 4.5.0
Binutils 2.16 Yes Yes Yes ? Yes Yes Yes Yes ? ? ? ? ? ? ? ? ? Yes ? ? ? ? ?
2.16.1 Yes Yes Yes ? Yes Yes Yes ? Yes ? ? ? ? ? ? ? ? ? ? ? ? ? ?
2.17 ? Yes ? Yes ? ? ? ? Yes Yes Yes ? ? Yes ? ? ? ? ? ? ? ? ?
2.18 ? Yes ? Yes ? ? ? ? ? ? ? Yes Yes Yes Yes Yes Yes ? Yes ? ? ? ?
2.19 Yes ? ? ? Yes ? ? ? ? ? ? ? ? Yes ? ? Yes Yes Yes ? ? ? ?
2.19.1 ? ? ? Yes ? ? ? ? ? ? ? ? ? ? ? ? ? Yes Yes Yes ? ? ?
2.20 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Yes Yes Yes

For Mac OS:

GCC 4.2.4 4.4.0 4.5.0
Binutils 2.18 Yes ? ?
2.19.1 ? Yes ?
2.20 ? ? Yes

When compiling GCC 4.3 or higher on OS X 10.4 and 10.5, you may get unresolved symbol errors related to libiconv. This is because the version shipped with OS X is seriously out of date. Install a new version (compile it yourself or use macports) and add --with-libiconv-prefix=/opt/local (or /usr/local if you compiled it yourself) to GCC's ./configure line. Alternatively you may place the libiconv source in gcc-x.y.z/libiconv and it will be compiled as part of the GCC compilation process. (This trick also works for mpfr and gmp).