Re: solaris build problem with Sun compilers

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: stange(at)rentec(dot)com, pgsql-ports(at)postgresql(dot)org
Subject: Re: solaris build problem with Sun compilers
Date: 2006-05-12 23:37:20
Message-ID: 200605122337.k4CNbKh02707@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

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?

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. +

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Alan Stange 2006-05-13 01:15:40 Re: solaris build problem with Sun compilers
Previous Message Tom Lane 2006-05-12 21:33:04 Re: solaris build problem with Sun compilers