Porting GCC to your OS: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
 
No edit summary
Line 1: Line 1:
{{Convert}}
{{Convert}}


''Note that the [GCC Cross-Compiler] page is intended to include the
:''Note that the [[GCC Cross-Compiler]] page is intended to include the information below (as well as filling in the To-Dos) once it is finished. Unless someone else does it first, I'll do so once my PDCLib is finished.''%%%-- MartinBaute
information below (as well as filling in the To-Dos) once it is finished.
Unless someone else does it first, I'll do so once my PDCLib is finished.''%%%-- MartinBaute


First, you should understand [How kernel, compiler, and C library work together]. If any of the next steps gives you trouble, the information given in that document should give you an idea of what is missing.
First, you should understand [[How kernel, compiler, and C library work together]]. If any of the next steps gives you trouble, the information given in that document should give you an idea of what is missing.


Next, you should build a [GCC Cross-Compiler] for your platform.
Next, you should build a [[GCC Cross-Compiler]] for your platform.


''ToDo: elaborate on [GCC]'s platform description, and how to set up your own if you don't want to use an existing one.''
:''ToDo: elaborate on [[GCC]]'s platform description, and how to set up your own if you don't want to use an existing one.''


Then, you need a C standard library for your platform - at least those parts required by GCC.
Then, you need a C standard library for your platform - at least those parts required by GCC.


''ToDo: elaborate on the requirements of GCC on the library.''
:''ToDo: elaborate on the requirements of GCC on the library.''


Finally, you would use the cross-compiler to compile [GCC] ''to run on your platform''.
Finally, you would use the cross-compiler to compile [[GCC]] ''to run on your platform''.


Just to be sure, you would use that "native" [GCC] to compile itself (to be sure it could, and for weeding out any issues that might arise from cross-compilation). Congratulations, you are now what people call "self-hosted", i.e. you no longer need some other OS to do development work. (Provided you have a working editor for your platform.)
Just to be sure, you would use that "native" [[GCC]] to compile itself (to be sure it could, and for weeding out any issues that might arise from cross-compilation). Congratulations, you are now what people call "self-hosted", i.e. you no longer need some other OS to do development work. (Provided you have a working editor for your platform.)


==See Also==
''External Links''
===External Links===
*[Scratch Box | http://www.scratchbox.org]
*[http://www.scratchbox.org Scratch Box]
*[LibOSDK Wiki | http://libosdk.berlios.de/wiki/index.php/Binutils]
*[http://libosdk.berlios.de/wiki/index.php/Binutils LibOSDK Wiki]