assembly files on Solaris SPARC can only be processed with gcc

Dennis Clarke dclarke at
Mon Aug 28 21:22:33 UTC 2017

On 8/28/17 5:01 PM, Marc Glisse wrote:
> On Sun, 27 Aug 2017, Dennis Clarke wrote:
>> I have been trying to get gmp-6.1.2 to build while avoiding the use of
>> "disable-assembly" in the configure stage. I think I may have tripped on
>> something here.  So I isolated everything into my home dir and gave it
>> a try.  Mostly trying to get some decent performance.
> If you care about performance, use gcc to compile GMP. The only good
> reason to compile GMP with studio is for gmpxx for ABI reasons.

Yep. I was thinking consistency across a whole toolchain wherein gcc has
not been used and there are no dependencies on libgcc or its brethern.

>> Configure looks fine thus :
>> v9_7++ $ ./configure ABI=64 --enable-cxx \
>>> --prefix=/export/home/dclarke/local \
>>> --libdir=/export/home/dclarke/local/lib \
> that libdir is redundant.

I figured .. left it in there for years.  gone now.

>>> --build=sparc64-sun-solaris2.10
> so you are explicitly trying to disable some optimizations?
>> checking compiler /opt/developerstudio12.5/bin/c99 -errfmt=error 
>> -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s 
>> -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs 
>> -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 
>> -xarch=sparc -I/export/home/dclarke/local/include -D_TS_ERRNO 

First past .. yes. However I go back and reset those flags to enable
optimizations and remove the debug data. However, I sort of wanted the
debug data and the ability to single step along. It has to be a trade
off with debug libs residing somewhere else I guess.

>> gmake[2]: *** [Makefile:768: gcd_1.lo] Error 1
> this isn't giving any hint as to what the error is :-(

yep .. I was told that m4 needs to pre-process those asm files and we
  should get output foo.s files.

>>  Should I even care?
> No (to the last question).

Let me think on that.

>> Better than before but a 12 year old PowerMac G5 does the same job in
>> just about 3.5 secs. An AMD Opteron at 3GHz does it all faster than 
>> that and I hear from Paul Zimmermann that his laptop is sub-second. 
>> Not sure
>> how to get some performance out of libgmp on this platform.  Am really
>> open to any thoughts.
> If you care about GMP performance, don't use sparc... 

I have access to a M7 based 4.1GHz system. It is fairly amazing in terms
of pure speed.  However it can not be had unless the Oracle compilers
are used.

$ fpversion
  A SPARC-based CPU is available.
  Kernel says CPU's clock rate is 4133.2 MHz.

  Sun-4 floating-point controller version 0 found.
  An UltraSPARC chip is available.

  Use "-xtarget=M7 -xcache=16/32/4/8:256/64/8/16:8192/64/8/32" 
code-generation option.

  Hostid = 0x865DA634.

$ file pi6_256M
pi6_256M: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 
Extensions Required [CBCOND VIS3], dynamically linked, not stripped

$ which openssl
$ openssl speed sha512
Doing sha512 for 3s on 16 size blocks: 18525471 sha512's in 2.99s
Doing sha512 for 3s on 64 size blocks: 20462241 sha512's in 3.00s
Doing sha512 for 3s on 256 size blocks: 11174149 sha512's in 3.00s
Doing sha512 for 3s on 1024 size blocks: 4919522 sha512's in 3.00s
Doing sha512 for 3s on 8192 size blocks: 791410 sha512's in 3.00s
OpenSSL 1.0.1p 9 Jul 2015
built on: date not available
options:bn(64,32) md2(int) rc4(ptr,int) des(ptr,risc1,16,int) 
aes(partial) blowfish(ptr)
compiler: information not available
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 
sha512           99132.96k   436527.81k   953527.38k  1679196.84k 

I don't know what good numbers are but that looks good.  There has
been a ton of money poured into the sparc platform in recent years and
the result is a fairly staggering system.  I think Rainer Orth has done
some work with gcc therein also but the Oracle Studio compilers are the
ones that are built to take advantage of these chips. So the marketing
goes.  :-\

Anyways, whatever it is these assembly files bring to the table may be
rocket science and I was merely trying to get gmp builds, reasonable
builds, across a whole suite of platforms. SPARC is a lot of things but
it isn't dead.


More information about the gmp-bugs mailing list