gcc 2.95.2 on Solaris does not support -m64
. You need to upgrade the compiler.
This message might also give some insight.
Question
I am trying to compile one test cpp code using shared installation of g++ on Solaris10 but it is compiling in 32 bit mode only.
/tools/gnu/bin/g++ -v
Reading specs from /tools/gnu/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/tools/gnu/bin/g++ -g -m64 ~/test9.cpp
cc1plus: -m64 is not supported by this configuration
cc1plus: -mptr32 not allowed on -m64
uname -aimnprsvX
SunOS md1sisun26 5.10 Generic_141444-09 sun4v sparc sun4vSystem = SunOS
Node = md1sisun26
Release = 5.10
KernelID = Generic_141444-09
Machine = sun4v
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 8
Can you please suggest me what option should I give here to generate 64 bit binary?
Thanks Niraj Rathi
Solution
gcc 2.95.2 on Solaris does not support -m64
. You need to upgrade the compiler.
This message might also give some insight.
OTHER TIPS
It looks like you have a 32 bits version of Solaris... You can test if I'm true with:
/usr/bin/isainfo -kv