why is xgcc invoked during a cross build of gcc?

Tony Bryant brd@paradise.net.nz
Tue Dec 10 18:05:00 GMT 2002


> My cross build works fine up until the time it starts to do things which
> invoke the xgcc which was built.
> Usually complaints about missing header files

Before compiling you're cross compiler - Install some headers appropriate to 
your target in {prefix}/{target}/include  (e.g. /usr/sh-elf/include), like 
perhaps the newlib headers. 

You'll also need some binutils built to do the full gcc compile.

In summary - this is what I'd do:

(assuming you have gcc, newlib and binutils sources in home directory)

Build and install binutils
--------------------------

mkdir ~/binutilsbuild
cd ~/binutilsbuild
../binutils/configure  --prefix=/usr --exec-prefix=/usr --target=sh-elf 
--build=i386-redhat-linux --host=i386-redhat-linux
make
su
make install

Copy target's system headers to correct place
---------------------------------------------------

su
mkdir /usr/sh-elf/include
cp -pvr ~/newlib/include/* /usr/sh-elf/include

Make and install gcc
---------------------------

mkdir ~/gccbuild
cd ~/gccbuild
../gcc/configure --prefix=/usr --exec-prefix=/usr --enable-languages=c,c++ 
--target=sh-elf --build=i386-redhat-linux --host=i386-redhat-linux
make 
su
make install








------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list