installing a cross compiler

William A. Gatliff
Thu Oct 11 06:31:00 GMT 2001


> I would install GCC as a cross-compiler but I have problems.

After reading the following, it sounds like you want a cross gcc that
runs on a Linux/386 host, and targets a solaris2.7 system.

> I'm building Gcc on a Red hat 7.1 system, Gcc (2.96 version) is
> already installed with the distribution and I would configure Gcc
> for solaris on the same computer.

Right.  The gcc 2.96 you are referring to is a "native" compiler.  It
produces executables for the host machine.

> First, I configure and build binutils :
>     configure --target=sparc-sun-solaris2.7 --prefix=/usr
>     make all install

This is probably ok, but I STRONGLY discourage your using /usr as your
prefix.  It's all too easy to screw things up when working as the root
user.  Instead, work as a normal user, and use a prefix that you have
permission to write to (a subdirectory of your home directory, for

> Then, I configure Gcc (3.0.1 version) :
>     configure --target=sparc-sun-solaris2.7 --prefix=/usr
>     make all install

Nope, this won't work.  As your error messages indicate, you're
missing a lot of header files.  See the FAQ at instead.

Note that to complete the procedure, you'll probably need a runtime
library as well.  The FAQ is currently underdocumented where glibc is
concerned, but when my new Sun Blade workstation arrives (this week!),
I'll look into it.  Suggestions from others are welcome.


Bill Gatliff

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

More information about the crossgcc mailing list