about cross-compile
Kazu Hirata
kazu@hxi.com
Sat Apr 7 06:03:00 GMT 2001
Hi Squall,
> when I am trying to compile a compiler cross m68k with
> gcc-2.95.2,
> i get errors in "libgcc2.c" and "frame.c"; here is the
> commands i executed:
> #./confgiure --target=m68k-coff --prefix=/cross
> #make LANGUAGES="C C++"
>
> it says that no "stdlib.h" "unistd.h" can't be found!
> and there are no such problems with gcc-2.8.1; so what can i do?
> thx
I think you need newlib (or a symlink to it) under your gcc-2.95.2
directory. You'll need --with-newlib. If I remember correctly, LANGUAGES
may be obsoleted and replaced by --enable languages.
Below is what I usually do for h8300-hms. I just changed it to m68k-coff.
tar xfz gcc-2.95.3.tar.gz
tar xfz newlib-1.9.0.tar.gz
cd gcc-2.95.3
ln -s ../newlib-1.9.0/newlib .
mkdir objdir
cd objdir
../configure \
--prefix=/usr/local --target=m68k-coff \
--enable-languages="c,c++" --with-newlib
gmake CFLAGS="-O2 -fno-strength-reduce -fomit-frame-pointer" all
gmake install #this has to be done by root
Kazu Hirata
More information about the Gcc
mailing list