Configuring for bare hw ia32 PC's

Jonathan S. Shapiro
Mon May 12 18:40:00 GMT 2008

On Mon, 2008-05-12 at 17:59 +0100, Luke A. Guest wrote:

> > Just FYI, this took some thuggery on the gcc link line handling, and at
> > this point you'll want to set up your own configuration. If you look in
> Do you mean, I should set up a new target? e.g. i386-pc-tamp? Surely
> this should be done for the final compiler that will be used at
> application level?

The issue has to do with the GCC link line. As long as your entire
libc.a is a single archive library, you are good to go. In our case,
there is an explicit split between libc.a (the stuff from newlib) and
libc-coyotos.a (the stuff we add). The two are *logically* a single
library, but not physically a single library.

The problem with this approach is that the link command that GCC issues
to ld needs to be modified to add the additional library and the
--begin-group/--end-group pairs.

As an interim measure you can do all of this by hand in your makefile.

An alternative is to have the add-on part of your libc build insert
things into libc.a explicitly, but from a build integrity perspective
this seems error prone.

> Although, saying that, it would be possible to use this application
> level compiler to actually build the OS with as well IIRC.

Yes. The OS build should be done with --nostdlib in any case.


More information about the Newlib mailing list