Linux -> Sun problem

David Korn
Thu Jul 12 07:37:00 GMT 2001

>-----Original Message-----
>From: Stuart Kenny [ ]
>Sent: 12 July 2001 15:03

>I have installed binutils 2.11 and I'm trying to build gcc 
>2.95 into the following directory

  So you're using different settings of --prefix for gcc and for binutils?
Sorry, that doesn't work.  Gcc and binutils *must* be configured with the
same prefix.

  Also, once you've installed binutils, you have to add $prefix/bin to
your $PATH settings.  You didn't mention if you had done that or not, but
the problem you describe certainly seems to be to do with the wrong version
of the assembler being found.

  Please try again; this time, use exactly the same --prefix for binutils
and gcc, dont forget to add $prefix/bin to $PATH after you install binutils,
and don't forget to use the --with-gnu-as and --with-gnu-ld flags when
you configure gcc.  This solution should be more robust than trying to
specify precise paths to the assembler and linker.

>I have placed target includes into

  I shall assume that's a typo and that you placed the target *libs* there!

>and the target headers into:

  They won't get fixincs run on them if you place them there.  I don't
know if the solaris 2.7 headers need it or not, but you could try placing
them in the sys-include directory instead; then fixincs will run over 
them, making any needed patches and installing the patched versions in
the include directory; after the build finishes, you could remove the
unpatched ones from sys-include.

>My configure line is (from config.status):
>--target=sparc-sun-solaris2.7 --enable-cpp 
>--enable-languages=c,c++,java -v --norecursion

  Missed out the --with-gnu-as and --with-gnu-ld; so the compiler has
assumed that you are using Sun's own native compiler/linker.  As I said
above, don't forget those options.

>I get through configure with no serius problems, but when I 
>try to build with
> make LDFLAGS=-static

  That looks a bit dubious.  If you want the compiler to be built without
any shared libraries, you have to use the --disable-shared option when
you configure it, as the source code need to be compiled differently; if
only the linker thinks you want a statically linked build and the rest
of the build process doesn't, things will go wrong.

"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music."
    - Kristian Wilson, Nintendo, Inc, 1989.

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

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

More information about the crossgcc mailing list