gmp build fails on UltraSPARC T1 for 64 bits (32 works)

David Chernoff chernoff at
Tue Apr 25 03:28:19 CEST 2006


uname -a
SunOS (...) 5.10 Generic_118822-20 sun4v sparc SUNW,Sun-Fire-T200

This is an UltraSparc T1.

Sun-supplied gcc compiler:
# /opt/gcc/bin/gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
with: /export/home/bldmstr/nightly/20060207_gcc2ir.s10.opt.tarbuild/src/configure --prefix=/opt/gcc --enable-languages=c,c++
Thread model: posix
gcc version 4.0.2 (gccfss)

gmp compiles and tests correctly with 32 bits:

CFLAGS=-O2 -m32

but fails with 64 bits

Problem 1: with
CFLAGS=-O2 -m64
./configure gives message

checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether /usr/sfw/bin/gmake sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles...
checking ABI=32
checking compiler /opt/gcc/bin/gcc -O2 -m64 ... yes
checking compiler /opt/gcc/bin/gcc -O2 -m64 has sizeof(long)==4... no
configure: error: could not find a working compiler, see config.log for

Apparently ABI=64 is not an option because it
has identified the cpu as generic sparc not ultrasparc


Adding -mcpu=v9 to the CFLAGS leads to the same result

Problem 2:  with
the compile fails in asm processing:

 /opt/gcc/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -
DOPERATION_divrem_1 -O2 -mcpu=v9 -m64 -c divrem_1.c  -fPIC -DPIC -
o .libs/divrem_1.o
cg error (as) : "__gnu_asm_inline_fake_test.c (template for
__gnu_asm_inline_temp_func_006)", line 2 : unknown opcode "addccc"

Any suggestions would be appreciated


More information about the gmp-bugs mailing list