This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 64 Bit code generation using gcc


Hi Ashish,

>How can I resolve my problem.

You have a GCC 2.95.3 built for 32-bit SPARC targets.

You need to get a GCC build for 64-bit SPARC targets.

The Sun Ultra 5 and Ultra 10 use a SPARC II CPU, which I think is capable of 32-bit and 64-bit modes.

If I recall correctly (and I may be complete wonky here; I haven't done any assembly work on SPARC), the SPARC II supports a SPARCv9 (64-bit) and SPARCv8+ (32-bit) instruction sets. SPARCv8+ being SPARCv8 32-bit plus some additional cool (nice performance) instructions not normally available to the SPARCv8 instruction set. (I''m sure the details of which are out on the internet somewhere.)

>If not, which gcc version I should use.

I do not know if GCC 2.95.x supports 64-bit SPARC targets. I suspect it does -- but it has to be built specifically for 64-bit.

I vaguely recall that there was some issue having a single GCC build that supports both 32-bit and 64-bit code generation. Either you need two separate GCC builds, or it takes some TLC (tender loving care) to get the configuration just right for everything to work.

This forum does not provide binaries -- we're mostly GCC users who are helping other users. GNU does not provide binaries either.

But this site...
http://sunfreeware.com/
...does provide prebuilt binaries for SunOS. Look for GCC there. And I recommend the latest GCC available there: GCC 3.4.2 when I just looked. That one has both 32-bit support (default) and 64-bit support (-m64).


Please read this...
http://docs.sun.com/db/doc/806-0477
...to determine if you really need 64-bit.

CAUTION: GCC (any version) prebuilts are tightly coupled to the SunOS version AND patch level of the system upon which they were BUILT. Why? Because patch levels often rev the system header files; and when GCC is built, it "fixes" the system header files and caches the GCC-ized ones. If your system has a different patch level (which is probably will), you MAY want to consider building your own GCC. But you still need a compiler (such as one from Sunfreeware.com) to bootstrap the whole process. If your not running into issues, or you don't use some of the dusty corner low level system API (e.g., the SPARC high-resolution hardware timers in libdt.so), you probably won't run into any issues.

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]