Skip site navigation (1) Skip section navigation (2)

Re: solaris build problem with Sun compilers

From: Alan Stange <stange(at)rentec(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-ports(at)postgresql(dot)org
Subject: Re: solaris build problem with Sun compilers
Date: 2006-05-18 12:40:36
Message-ID: 446C6B44.9040800@rentec.com (view raw or flat)
Thread:
Lists: pgsql-ports
Bruce Momjian wrote:
> Alan Stange wrote:
>> Tom Lane wrote:
>>> Alan Stange <stange(at)rentec(dot)com> writes:
>>>   
>>>> Check out the comment and implementation for cas32() in this .il 
>>>> template file for libc from OpenSolaris:
>>>>     
>>>   
>>>> http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/sparc/threads/sparc.il
>>>>     
>>> If you mean
>>>
>>>           * When compiling with -xarch=v8, the compiler refuses to
>>>           * accept the 'cas' instruction, so we encode it in hex below.
>>>
>>> I can't say that that impresses me.  It still will fail on v8 chips no?
>>> What's the point of fooling the compiler if you can't fool the hardware?
>> I believe the trick here is that Solaris 10 will only run on v9 hardware 
>> (or the sun4u systems), which all have the instruction.   But the v8 ABI 
>> "model" doesn't have it.   So, in some sense the ABI doesn't "allow" 
>> this instruction, but the hardware does, so they can just slam it in 
>> knowing that it'll work.


> Uh, are you saying our Solaris Sparc "cas" ASM is only going to work for
> Solaris 11 tools?  That doesn't sound good.  We must have people using
> earlier Solaris tools.

No, I'm not saying that at all.

I think I'm saying that cas is OK for any reasonable Solaris+Sparc+Sun 
compiler combination.  It'll fail on any SuperSparc based hardware and 
older compilers (more than ~5 years), but that's too bad.

I'm also saying that cas in not OK for any gcc+binutils combination.  As 
far as I can tell, gcc is still building code for the v7 platform by 
default.  It's possible to override this, but I don't think it's 
something you can test for in the preprocessor.

-- Alan



In response to

Responses

pgsql-ports by date

Next:From: Alan StangeDate: 2006-05-18 13:09:24
Subject: Re: solaris build problem with Sun compilers
Previous:From: Bruce MomjianDate: 2006-05-18 00:42:26
Subject: Re: solaris build problem with Sun compilers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group