5.1.2 assembler error on Solaris 10 with CC='cc -xtarget=opteron -xarch=amd64'

Niels Möller nisse at lysator.liu.se
Tue Oct 8 09:55:35 CEST 2013

"Daniel Richard G." <skunk at iSKUNK.ORG> writes:

> Getting updates for Sun products is not easy now that Oracle runs
> the show :(

And the OpenSolaris thing always used gcc, and never included Sun's

>> Could you show some of those lines?
>> (you many need to remove the last line of mpn/m4-ccas so the file
>> doesn't disappear)
> Of course:
>         .text
>         .align  16
>         .globl  __gmpn_add_nc
>         .type   __gmpn_add_nc, at function
> __gmpn_add_nc:
>         mov     %ecx, %eax
>         shr     $2, %rcx    <---- line 86
>         and     $3, %eax
>         bt      $0, %r8     <---- line 88
>         jrcxz   .Llt4

It seems it complains about the first instructions using the 64-bit
registers. My guess is that the assembler is trying to interpret this is
32-bit x86 code. Which won't work at all, of course.

I think you have to first figure out which flags to pass to cc, to get
it to invoke the assembler in x86_64 mode (-m64 is not recognized, and
apparently -xarch=amd64 is not enough). And then we can see how to get
gmp's configure script to do pass the right flags automatically.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-bugs mailing list