compiling on sparc

Alex S Moore asmoore at edge.net
Fri Jul 23 00:40:04 CEST 2004


On Thu, 22 Jul 2004 22:12:28 +0200
Dennis Lubert <plasmahh at gmx.net> wrote:

> this error : 
> http://www.swox.com/list-archives/gmp-bugs/2004-January/000042.html
> I tried to add -fPIC to CFLAGS for configure, but then the compiling
> breaks with some error about requesting sparclight ...

I am supposed to build pkgs with Sun's compiler first and gcc only as a
last resort.  I know very little about gcc, so I can help on this.

> If you can tell me how to do it with the 
> sun compiler (Sun C 5.5 2003/03/12 installed here) it would be nice.
> My final goal is to get rid of the bus error when using gmp, so I
> tried to use 4.1.3 (4.reallyold installed here)

Here is how I build the sparcv9 library.  Change references to /opt/csw
to whatever you need.
Source a file that contains the following.  Use the full path to Sun's
cc and CC if your path is wrong.  Also, do have /usr/ccs/bin in your
path for that version of make or use gmake.  I use make.  Do not have
/usr/ucb/bin in your path.
-->
#!/usr/bin/sh
# 'compiler and linker flags'
CFLAGS='-fast -xtarget=ultra -xarch=v9'
export CFLAGS
CC=cc
CXX=CC
export CC CXX
ABI=64
export ABI
<---
Then I run configure with the following statement:
./configure --prefix=/opt/csw --libdir=/opt/csw/lib/sparcv9
Then make and make install.

Building some of the various sparcv8 libraries is a bit trickier, but
you said you wanted sparcv9.

Alex


More information about the gmp-discuss mailing list