Re: solaris build problem with Sun compilers - Mailing list pgsql-ports

From Bruce Momjian
Subject Re: solaris build problem with Sun compilers
Date
Msg-id 200605122337.k4CNbKh02707@candle.pha.pa.us
Whole thread Raw
In response to Re: solaris build problem with Sun compilers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-ports
Tom Lane wrote:
> Alan Stange <stange@rentec.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?

Wow, that is _insane_ --- you can't code the ASM, so you specify the
instructions in _hex_.  However, they must like cas more than ldstub or
they wouldn't have gone through that much work to use cas.

I am thinking we revert to ldstub and add a comment that we are not
using cas() because of sparc v8.

I just checked gcc on Solaris 2.9 (Solaris 9?), and there is no
specification of the type of sparc processor:

     /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/cc1 -quiet -v
    -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -Dsparc
    -D__sparc__ -D__sparc -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc
    x.c -quiet -dumpbase x.c -auxbase x -version -o /var/tmp//ccBSywG7.s

--
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-ports by date:

Previous
From: Tom Lane
Date:
Subject: Re: solaris build problem with Sun compilers
Next
From: Alan Stange
Date:
Subject: Re: solaris build problem with Sun compilers