Problem building gcc4.2.2 on Solaris 10 for x64

Joe Pallas pallas@cs.stanford.edu
Fri Feb 1 23:08:00 GMT 2008


I'm trying to build gcc4.2.2 on Solaris 10 on an AMD machine.  I'm  
using the recommended configure options for as and ld (I have -- 
enable-languages=c,c++ --with-gnu-as --with-as=/usr/local/bin/as -- 
without-gnu-ld --with-ld=/usr/ccs/bin/ld) and I get this scary error  
when it tries to build amd64/gmon.o:

/local/pallas/gcc422build/./gcc/xgcc -B/local/pallas/gcc422build/./ 
gcc/ -B/home/pallas/gcc422/i386-pc-solaris2.10/bin/ -B/home/pallas/ 
gcc422/i386-pc-solaris2.10/lib/ -isystem /home/pallas/gcc422/i386-pc- 
solaris2.10/include -isystem /home/pallas/gcc422/i386-pc-solaris2.10/ 
sys-include -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict- 
prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./ 
include  -I. -Iamd64 -I/home/pallas/tools/gcc-4.2.2/gcc -I/home/ 
pallas/tools/gcc-4.2.2/gcc/amd64 -I/home/pallas/tools/gcc-4.2.2/ 
gcc/../include -I./../intl -I/home/pallas/tools/gcc-4.2.2/gcc/../ 
libcpp/include  -I/home/pallas/tools/gcc-4.2.2/gcc/../libdecnumber - 
I../libdecnumber -m64 \
         -c /home/pallas/tools/gcc-4.2.2/gcc/config/i386/gmon-sol2.c - 
o amd64/gmon.o
/var/tmp//cc3019Gz.s: Assembler messages:
/var/tmp//cc3019Gz.s:291: Error: invalid character '.' in mnemonic
gmake[5]: *** [amd64/gmon.o] Error 1

The reason I find this scary is that it looks as though my new gcc  
has generated output that the assembler doesn't understand.   
Compiling with -v shows:

  /usr/local/bin/as -V -Qy --64 -s -o amd64/gmon.o /var/tmp//ccjLW7Z8.s
GNU assembler version 2.16.1 (i386-pc-solaris2.10) using BFD version  
2.16.1
/var/tmp//ccjLW7Z8.s: Assembler messages:
/var/tmp//ccjLW7Z8.s:291: Error: invalid character '.' in mnemonic

So my assembler is 2.15 or later, as required.  Is there actually  
some other requirement?

The troublesome assembly is:

    289          movl    $65534, %eax
    290          cmpq    $65535, %rdx
    291          cmovq.l tolimit(%rip), %rax
    292          movq    %rax, tolimit(%rip)

I'm not familiar with the amd64 mnemonics, so I don't know if this  
ought to be legal or not.

Any help?
Thanks.
joe



More information about the Gcc-help mailing list