Wrong assembler used with gcc 4.3.0 on Solaris 9
Tue Apr 1 16:39:00 GMT 2008
Does the environment variable GCC_EXEC_PREFIX point to where the binutils are?
I had a similar problem and while searching for answers I some how came across this document:
I changed the value to the env var and all seems to be working well.
This is only a suggestion from very brief experience.
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Langella Raphael
Sent: Tuesday, April 01, 2008 1:23 AM
Subject: Wrong assembler used with gcc 4.3.0 on Solaris 9
I've built gcc 4.3.0 (with ada) and binutils 2.18 on Solaris 9. Hello world program works fine in C, but fails in C++ and ada :
# g++ hello.cxx
/usr/ccs/bin/as: "/var/tmp//ccDeMxqh.s", line 139: error: unknown opcode ".weakref"
/usr/ccs/bin/as: "/var/tmp//ccDeMxqh.s", line 139: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccDeMxqh.s", line 140: error: unknown opcode ".weakref"
[and a lot more of these errors]
The same happens with gnatmake and an ada helloworld.
I don't understand why the default solaris assembler is used instead of the binutils one (which can be found at the very beginning of my PATH).
This works :
g++ -S hello.cxx
as -xarch=v9 hello.s
How to specify which assembler to use ? Why doesn't it use the first one found in PATH ?
More information about the Gcc-help