Compiling gcc-2.95.2 for use as m68k cross compiler

Mark Palmerino
Fri Mar 2 03:31:00 GMT 2001

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.

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.

> It is missing the c library header files.  If you have prebuilt
> libraries and headers, then you can use
> --with-headers=<pathtoheaders> and --with-libs=<pathtolibs> with
> configure.

> Otherwise you can use newlib.  Linking the newlib
> directory into your gcc source directory means you don't have to use
> --with-headers option with configure e.g.
> So in your <pathtogccsource>/gcc-2.9.5/
> "ln -s <pathtonewlibsource>/newlib-1.8.1/newlib newlib"
> Of course if you are using a newer version of newlib sub that
> in.
> 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?

Any ideas as to what the problem below is?

-------------- clip ---------------
/h/crossgcc/build-gcc295/gcc/xgcc -B/h/crossgcc/build-gcc295/gcc/
-B/usr/local/m68k-coff/bin/ -
idirafter /h/crossgcc/build-gcc295/m68k-coff/newlib/targ-include -idirafter
5.2/newlib/libc/include -nostdinc -c -g -O2 -fno-implicit-templates
dc++ -I../../../gcc-2.95.2/libstdc++/stl -I../libio
-I../../../gcc-2.95.2/libstdc++/../libio -n
ostdinc++  -DLD `for N in EXTRACT INSERT; do echo " -D${N}"; done` \
  ../../../gcc-2.95.2/libstdc++/ -o ldcomio.o
touch bigstmp-complx
cd ../libiberty ; make "SHELL=/bin/sh" "INSTALL=/bin/sh
/h/crossgcc/gcc-2.95.2/install-sh -c" "
INSTALL_DATA=/bin/sh /h/crossgcc/gcc-2.95.2/install-sh -c -m 644"
"INSTALL_PROGRAM=/bin/sh /h/c
rossgcc/gcc-2.95.2/install-sh -c " "prefix=/usr/local"
"exec_prefix=/usr/local" "tooldir=/usr/l
ocal/m68k-coff" "gxx_include_dir=/usr/local/include/g++-3"
8k-coff/2.95.2" "gcc_version=2.95.2"
 "AR=m68k-coff-ar" "AR_FLAGS=rc" "CC=/h/crossgcc/build-gcc295/gcc/xgcc
95/gcc/ -B/usr/local/m68k-coff/bin/ -idirafter
nclude -idirafter /h/crossgcc/gcc-2.95.2/newlib/libc/include -nostdinc"
gcc295/gcc/xgcc -B/h/crossgcc/build-gcc295/gcc/ -B/usr/local/m68k-coff/bin/
-idirafter /h/cross
gcc/build-gcc295/m68k-coff/newlib/targ-include -idirafter
clude -nostdinc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "NM=m68k-coff-nm"
"LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 -fno-implicit-templates" "LOADLIBES="
FO=/h/crossgcc/build-gcc295/texinfo/makeinfo/makeinfo "
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

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

More information about the crossgcc mailing list