RE: Building gcc-4.2.4 on Solaris 9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -Forwarded Message Attachment-- 
> Date: Tue, 29 Jul 2008 
> [D] From: David 
>  To: gcc-help@xxxxxxxxxxx 
> Subject: Building gcc-4.2.4 on Solaris 9 

> [D] I'm trying to build gcc-4.2.4 on a 64-bit Solaris 9 SPARC system, 
> [D] using the Sun Studio compiler (Sun C 5.8). 

> [D] I'm attempting to build 64-bit binaries (bad idea?).  I've built  
> [D] 64-bit versions of libmpfr and libgmp, and I have CC="cc  
> [D] -xarch=generic64".  I'm running into a problem when building the stage  
 
> [D] ld: fatal: file  
> [D] /data/software/devtools/mpfr-2.3.0-sparc-sun-solaris2.9/lib/libmpfr.so:  
> [D] wrong ELF class: ELFCLASS64  
> [D] ld: fatal: file  

> [D] The problem is that fortran .o files are 32-bit, not 64-bit: 

 Personally, I would just avoid the "biarch"-ness (don't set
 CC and/or CFLAGS) and *some* of the automatic
 guessing of host/build/target and do this:

run config.guess
probably it will say sparc-sun-solaris2.9.

Then do this:

  mkdir /obj  
  cd /obj  
  /src/configure \
   -disable-nls \
   -build sparc-sun-solaris2.9 \  (ok, you can omit this line, -build is always correctly guessed in my brief experience) 
   -host sparc64-sun-solaris2.9 \
   -target sparc64-sun-solaris2.9 

 (Single dash options are clearly supported by configure.) 

Also, it is a bit of a time sink, but you can stick the gmp and mpfr source right into the gcc source tree and it'll build "all at once". (renaming mpfr-2.3.0 to mpfr, etc.) 
In fact, that might help you, since it'll net you sparc32 and sparc64 if needed.

This definitely won't be the quickest way.
Quicker would be to set CC/CFLAGS and use -disable-bootstrap.


 - Jay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux