Basic build questions

Mike Stump mrs@wrs.com
Wed Jun 30 15:43:00 GMT 1999


> From: "Bates, Rod" <Rod.Bates@Wichita.BOEING.com>
> To: "'egcs@egcs.cygnus.com'" <egcs@egcs.cygnus.com>
> Date: Wed, 23 Jun 1999 09:49:29 -0500

> Before I spend a lot of time on this, and to determine whether it is
> even necessary at all, I need to understand some basic things about
> the egcs bootstrap process.

> 1) Is it true that, during the second build of the compiler, I must
> be able to get xgcc to link *.o files which it built with *.o and
> *.a file(s) that are provided by the native OS?  In particular,
> probably crt*.o and libc.a?  Trying to do this is where the
> incompatibilities show up.

No.  You can cross compile from anything, and provide your own libc.a
built with the GNU tools, if you want.  If you want to use the native
libc.a, then you will have to find a way to convert them, or otherwise
make things compatible.

> 2) When a link fails with undefined symbols, is there a better way
> to figure out where they should be found than using find, nm, and
> grep on every *.o and *.a on the machine for one with the missing
> symbol, then guessing which is appropriate, if there is more than
> one?  This is the only method I've thought of so far.  It's terribly
> slow and often gives answers I don't feel very confident of.

This is easy, libc.a should have 0 symbols undefined, and almost all
symbols should be in it.  The exceptions are the symbols in libm.a.
(ok, this is a simplistic view of the world)  Other symbols that gcc
uses should be found in it's runtime libraries (libgcc.a,
libstdc++.a...).



More information about the Gcc mailing list