cross-compiling problems

Rupert Wood rup@kanat.pair.com
Wed Oct 9 01:13:00 GMT 2002


Azmir Ibrahim wrote:

> i need some help here on building a cross compiler on RedHat 7.2 for
> solaris2.5.
:
> i already downloaded gcc-2.95.3 , newlib-1.10.0 and binutils-2.13
:
> ../../gcc-2.95.3/gcc/gthr-posix.h:37: pthread.h: No such file or directory

You shouldn't use newlib to target Solaris; you should get the
/use/include tree and the contents of /lib and /usr/lib (but not
subdirectories) from a Solaris 2.5.1 install, and then configure
--with-headers= and --with-libs=.

If you have to use newlib, you probably need to build for a non-specific
OS, i.e. target sparc-elf. I don't know how well that's going to work on
Solaris, though.

What's probably happening is that it expects to find pthread.h if it's
building threaded libraries for Solaris. You could work around this by
configuring --disable-threads but you really need headers and libs for
the OS.

Rup.



More information about the Gcc-help mailing list