Compiling gcc-2.95.2 for use as m68k cross compiler

Aklilu Noah
Fri Mar 2 10:49:00 GMT 2001

On Fri, 2 Mar 2001, Mark Palmerino wrote:

> Date: Fri, 02 Mar 2001 06:25:49 -0500
> From: Mark Palmerino <>
> To: Noah Aklilu <>,
> Subject: Re: Compiling gcc-2.95.2 for use as m68k cross compiler
> Hi Noah and everyone,
> I tried your suggestion and it looks like the make is spending a bit of time
> compiling the newlib stuff. Then it looks like it started chunking through
> the libio and libstdc++ stuff. And now it stops with the error listed at the
> bottom of this email.

When I look at your error it looks like you are still building gcc.  When
you make in the gcc source directory, it only builds gcc but it  uses the
headers from newlib.  After you have finished building gcc and installed
it (so that you can use it to build newlib), you can start building newlib
i.e. run configure for newlib and run make to compile the source.

> I'd like to ask, though, how did you know that was the problem?  I spent not
> a small amount of time picking through the error messages and trying to
> understand how the configure files are working etc., but, of course, saw no
> hint that made me think I needed link in the libraries.

Experience and shared group knowledge.  You are not actually linking in
the libraries when you are building gcc just providing the header files
so that it knows that the "c" library exists somewhere.

> > 
> > I like to add "--with-gnu-ld --with-gnu-as --with-newlib" to
> > the configure options to make things go a little smoother if
> > you are using newlib (which you build after gcc) and binutils.
> Let me ask a question here - how do these last three work - if I use
> '--with-newlib' how does it know where to find newlib?

This option tells that you are planning to use newlib so it shouldn't
worry about put _eprintf in libgcc.a.


> make[2]: Entering directory `/h/crossgcc/build-gcc295/m68k-coff/libiberty'
> make[2]: *** No targets.  Stop.
> make[2]: Leaving directory `/h/crossgcc/build-gcc295/m68k-coff/libiberty'
> make[1]: *** [../libiberty/libiberty.a] Error 2
> make[1]: Leaving directory `/h/crossgcc/build-gcc295/m68k-coff/libstdc++'
> make: *** [all-target-libstdc++] Error 2

Personally I have never had this error.  I believe this is because it
needs an existing set of startup files (e.g. crt0.o).  I dug through
my notes and remember a posting a while ago in the mailing list that
covered building cross-gcc for m68k and talks about dealing with
this.  Something to look at.

Noah Aklilu
"Integrity is something you do when no one is looking"

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list