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

Daniel Richard G. skunk at iSKUNK.ORG
Wed Oct 9 23:51:27 CEST 2013


On Wed, 2013 Oct  9 11:02+0200, Torbjorn Granlund wrote:
>
>   It seems like fbe is only accepting more specific forms of various
>   mnemonics.
>
> That makes no recent GMP version usable with these tools.

Are you aware of what the distinction is between e.g. shr and shrl/shrq?

>   Alternately, is there a way to have GMP assemble these source files
>   using $(AS), without going through the C frontend?
>
> Not easily.  You could write a script "mycc" which DTRT.

I see that the C compiler is actually invoked as $(CCAS) when compiling
assembly, and if one sets this at configure time, it will use that
instead of $(CC). So I could specify CCAS=as. But CFLAGS et al. are
passed in as arguments, and as(1) here does not like -O or -xO3.

> Since I cannot guess what might happen at the lines you cut, I cannot
> say anything useful.

This is the problem, in a nutshell:

    $ cc -m64 -c hello.c ; echo exit status $?
    cc: Warning: illegal option -m64
    exit status 0
    $ file hello.o
    hello.o:        ELF 32-bit LSB relocatable 80386 Version 1

    $ cc -xarch=amd64 -c hello.c ; echo exit status $?
    exit status 0
    $ file hello.o
    hello.o:        ELF 64-bit LSB relocatable AMD64 Version 1


--Daniel


-- 
Daniel Richard G. || skunk at iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.


More information about the gmp-bugs mailing list