Have GCC uses NASM as the assembler?

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

 



We are trying to build a library on Solaris 11.3. We installed GCC 5.4
so we have an update compiler available. The library uses SHA
intrinsics. The build process is driven through the compiler driver.

The build is failing with:

g++ -g2 -O3 -fPIC -m64 -Wa,--divide -msse4.2 -msha -c sha-simd.cpp
{standard input}: Assembler messages:
{standard input}:166: Error: no such instruction: `sha1rnds4 $0,%xmm0,%xmm7'
{standard input}:199: Error: no such instruction: `sha1nexte %xmm0,%xmm2'
{standard input}:206: Error: no such instruction: `sha1msg1 %xmm0,%xmm10'
{standard input}:212: Error: no such instruction: `sha1rnds4 $0,%xmm2,%xmm9'
{standard input}:239: Error: no such instruction: `sha1nexte %xmm2,%xmm7'
...

It seems the Solaris assembler cannot handle SHA extensions at this time:

/usr/bin/as -V </dev/null
as: Studio 12.5 Compiler Common 12.5 SunOS_i386 s11_3sru9_2 05/16/2016

We would like to ask GCC to use NASM instead of 'as'. On Mac's we do
similar with `-Wa,-q`. The option uses Clang's integrated assembler
instead of `as`.

Is there a way to tell GCC to use a different assembler? Or is there a
way to tell GCC to use NASM for a particular source file?

Jeff



[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