Compiling GCC 2.95.1 for m68k-coff Cross Compiler
W Gerald Hicks
wghicks@bellsouth.net
Mon Oct 25 04:57:00 GMT 1999
> dummy.c:1: sys/types.h: No such file or directory
> dummy.c:8: stdio.h: No such file or directory
> dummy.c:9: time.h: No such file or directory
> dummy.c:10: signal.h: No such file or directory
>
> Copy include directory in /home/Compile/build-gcc/m68k-coff
> Doesn't work
Looks like the hard way to me :-)
I use a derivation of the one-tree script from Cygnus to assemble a complete
toolchain tree; This uses newlib to supply the missing headers and works
automatically for me (hosted on FreeBSD):
First extract the binutils, gcc and newlib archives to a work directory,
change to that directory and apply the following script:
#!/bin/sh
###################################################
BINUTILS_REV=${BINUTILS_REV:-2.9.1}
GCC_REV=${GCC_REV:-2.95.1}
NEWLIB_REV=${NEWLIB_REV:-1.8.1}
# 1. merge the include dirs for binutils and gcc
# with gcc taking precedence.
(cd gcc-${GCC_REV}/include && tar cf - .) | \
(cd binutils-${BINUTILS_REV}/include && tar xf -)
(cd binutils-${BINUTILS_REV}/include && tar cf - .) | \
(cd gcc-${GCC_REV}/include && tar xf -)
# 2. move the binutils directories into the egcs-onetree
for dir in bfd binutils gas gprof ld opcodes ; do
mv binutils-${BINUTILS_REV}/$dir gcc-${GCC_REV}
done
# 3. move the newlib directories into the egcs-onetree
for dir in libgloss newlib ; do
mv newlib-${NEWLIB_REV}/$dir gcc-${GCC_REV}
done
# 4. get rid of raided distdirs and rename gcc-* to src
rm -fr binutils-${BINUTILS_REV}
rm -fr newlib-${NEWLIB_REV}
mv gcc-$GCC_REV src
############################################################
Then make a build directory, change to it and run a configuration
followed by the build itself:
mkdir m68k-coff
cd m68k-coff
sh ../src/configure --target=m68k-coff
gmake
Good Luck,
Jerry Hicks
wghicks@bellsouth.net
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list