public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* cross-compiling problems
@ 2002-10-08 13:26 azmir ibrahim
  2002-10-09  1:13 ` Rupert Wood
  0 siblings, 1 reply; 3+ messages in thread
From: azmir ibrahim @ 2002-10-08 13:26 UTC (permalink / raw)
  To: gcc-help

hello...i need some help here on building a cross compiler on RedHat 7.2 for 
solaris2.5.I'm just a newbie.I'm hoping somebody can give me some help

host=i686-pc-linux-gnu
target=sparc-sun-solaris2.5
prefix=/root/crosser/sparc

i already downloaded gcc-2.95.3 , newlib-1.10.0 and binutils-2.13

here i my step
my first step is building binutils

$ mkdir build-gcc sparc build-newlib build-binutils
$ cd build-binutils
$ ../binutils-2.13/configure --prefix=/root/crosser/sparc 
--target=sparc-sun-solari  s2.5
$ make all install
$ export PATH=$PATH:/root/crosser/sparc/bin

all seem to work like it should have
the next step is building a bootstrap gcc

$ cd ..
$ cd build-gcc
$ ../gcc-2.95.3/configure --prefix=/root/crosser/sparc 
--target=sparc-sun-solari  s2.5 --without-headers --with-newlib
$ make all-gcc install-gcc

An error has occured in this step.Here is the error:

In file included from gthr-default.h:1,
                 from ../../gcc-2.95.3/gcc/gthr.h:98,
                 from ../../gcc-2.95.3/gcc/libgcc2.c:3034:
../../gcc-2.95.3/gcc/gthr-posix.h:37: pthread.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/root/crosser/build-gcc/gcc'
make: *** [all-gcc] Error 2

I am hoping somebody can help me.I already read the tutorial and manual but 
i still cannot compile the gcc.
Thank you in advance.


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cross-compiling problems
  2002-10-08 13:26 cross-compiling problems azmir ibrahim
@ 2002-10-09  1:13 ` Rupert Wood
  2002-10-09  1:23   ` Rupert Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Rupert Wood @ 2002-10-09  1:13 UTC (permalink / raw)
  To: azmir ibrahim; +Cc: gcc-help

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cross-compiling problems
  2002-10-09  1:13 ` Rupert Wood
@ 2002-10-09  1:23   ` Rupert Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Rupert Wood @ 2002-10-09  1:23 UTC (permalink / raw)
  To: azmir ibrahim; +Cc: gcc-help

An afterthought:

> Azmir Ibrahim wrote:
>
> > i already downloaded gcc-2.95.3 , newlib-1.10.0 and binutils-2.13

You might hit problems with binutils-2.13. I think there was something
broken with the Solaris linker for C++, although I'm not sure if that's
specific to the newer C++ ABI(s) in the GCC 3.x series.

2.95 shouldn't need a bang-up-to-date binutils; you should be safe falling
back to 2.12.x.

> You shouldn't use newlib to target Solaris; you should get the
> /use/include tree

and a typo - should have been /usr/include.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-09  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 13:26 cross-compiling problems azmir ibrahim
2002-10-09  1:13 ` Rupert Wood
2002-10-09  1:23   ` Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).