This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: about cross-compile
- To: 'Squall Tang' <squalls_tang at 263 dot net>, gcc at gcc dot gnu dot org
- Subject: RE: about cross-compile
- From: Kazu Hirata <kazu at hxi dot com>
- Date: Sat, 7 Apr 2001 09:00:22 -0400
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