Talk:OS Specific Toolchain

From OSDev.wiki
Revision as of 16:53, 23 November 2007 by AJ (talk | contribs) (Added Successful Configuration section.)
Jump to navigation Jump to search

Excellent work! As for how to continue with this... I was originally intending what is the GCC Cross-Compiler article today to become a multi-part tutorial, starting with the cross-compiler setup and ending with a self-supporting OS. You can see the stubs for the later steps in the article. Of course I would prefer that tutorial to include PDCLib instead of newlib, but newlib is available today. Maybe it's time to expand the cross-compiler tut. into the multi-part thing it was originally meant to be? Opinions? Solar 06:21, 13 September 2007 (CDT)


I'm not familiar enough with the inner workings of gcc and binutils to say something meaningful about it, but I wonder to what extent a stage 2/3 cross-compiler would be buildable with a plain unmodified i586-elf target. If it is, this tutorial is just a sidestep for the geeks who see the uses of a specifically named toolchain (or just want gcc to be named after them) and the cross-compiler tutorial is mostly independent.
On the other hand, the cross-compiler tutorial is for most people to just get a stage 1 compiler which is suitable for kernel development. It could be wise to use the crosscompiler page for just that, and build a stage 2/3 and stage 4 crosscompiler in separate articles (something like, this article and Porting GCC).
I posted a PM to the author in the meantime in which I said that this article is very well suited for inclusion in the main namespace. Independent of what we are to do with it, I don't think we should withhold other uses from finding and using this article. At worst somebody discover errors, which isn't even too bad since we can fix that later.
@Solar: I tried once building a stage 2 gcc with PDCLib but it failed with conflicting types for size_t so I guess newlib is for now the way to go.
- Combuster 10:46, 13 September 2007 (CDT)


Okay, its moved. GCC and binutils are quite interlinked so should remain in the same section. I don't, however, see any problem with splitting the newlib bit into a separate section (although then the overlap with Porting Newlib is quite apparent), so we could just have links at the bottom of the GCC/binutils bit to the newlib page and also to a (future) PDCLib page. Unfortunately, I don't have much experience with PDCLib. Originally, I tried with glibc (glutton for punishment) but eventually gave up trying to understand their definition of 'unix' and 'posix' (they implement some aspects of the Single Unix Specification, and you implement the rest. Unfortunately, they don't explain anywhere what you are supposed to implement, and adding each function tended to require a complete rebuild, including reconfiguring every directory). I chose newlib late one night because pcmattman had already demonstrated proof-of-principle.
I'm all for expanding the cross compiler tutorial, but have concerns that we might make it too complex beyond the level of instructing new visitors on the methods for building a cross compiler. Basically, I don't want to fill up the forum with lots of simple questions from people not following the instructions precisely. It should be made extremely clear that this article is not intended for beginners.
As I've now moved this article to the main namespace, I'll remove the Creating a new binutils target which was my forerunner to this article and is really just a less-well written and designed version of the first section.
Many thanks for your kind comments. John 12:39, 13 September 2007 (CDT)
Also, I'm adding this to the tutorials category, but think it might be wise to maybe create a subcategory on tutorials for creating user-space tools or something, because otherwise it might become one of the first ports of call for people looking for an 'OS development tutorial'. I've made a comment to that effect on the Tutorials talk page. John 12:44, 13 September 2007 (CDT)


If needs be, you can overwrite my version of the Porting Newlib article with your description, which is more in-depth than mine. Specifically, it covers adding a new system as your newlib target, which I couldn't find out how to do properly. I'll be referring to this tutorial later when I get around to porting the toolchain to my OS - it's really well done.
- Pcmattman 23:30, 14 September 2007 (CDT)


Grid of Successful Configurations

As suggested on the forum, I am submitting a successful configuration for following this tutorial. Perhaps once there are enough of these, we can sort out how to format the information. For my part:

cygwin-based:
i586-pc-caracal - based strictly on the tutorial using binutils 2.18 and GCC (with g++) 4.2.2.
x86_64-pc-caracal - same version of GCC and binutils using x86_64 as a template.
                  - Extra emulation target added: i386 elf and coff.