Sun Studio 11 compile on Solaris 10 fails "make check"

Nicholas Oxhøj nicholas at oxhoej.dk
Thu Jan 3 11:57:05 CET 2008


Hi,

I tried compiling gmp-4.2.2.tar.gz on a Solaris 2.10 sun4u sparc using 
the Sun Studio 11 compiler ("cc -V" returns "cc: Sun C 5.8 2005/10/13").

But "make check" failed the "t-get_d" test:

PASS: t-asmtype
PASS: t-aors_1
PASS: t-divrem_1
PASS: t-fat
mpn_get_d wrong on random data
   sign     0
   n        =0x1FF800FE007FC0
   nsize    1
   exp      -37
   want     =[43 3F F8 00 FE 00 7F C0] 8998407423164352
   got      =[40 EF F8 00 FE 00 7F C0] 65472.031006097327918
/bin/bash: line 4: 27109 Abort                   (core dumped) ${dir}$tst
FAIL: t-get_d
PASS: t-instrument
PASS: t-iord_u
PASS: t-mp_bases
PASS: t-perfsqr
PASS: t-scan
==================================
1 of 10 tests failed
Please report to gmp-bugs at swox.com
==================================

uname -a returns "SunOS fep7 5.10 Generic_118833-36 sun4u sparc 
SUNW,UltraAX-i2"
./config.guess returns "ultrasparc2-sun-solaris2.10"
./configfsf.guess returns "sparc-sun-solaris2.10"

I seem to have fixed the problem by setting "-fsimple=0" in line 3366 of 
the configure script, such that the compiler now generates code 
complying with the IEEE-754 floating-point arithmetic standard.

3361c3361
<             # -fns=no and -fsimple=1 disable some transformations that
---
 >             # -fns=no and -fsimple=0 disable some transformations that
3366c3366
<             cc_64_cflags="-fast -fns=no -fsimple=1 -xarch=v9"
---
 >             cc_64_cflags="-fast -fns=no -fsimple=0 -xarch=v9"

Regards,
Nicholas Oxhøj


More information about the gmp-bugs mailing list