X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0773D9FA1B0 for ; Fri, 12 May 2006 17:27:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 39529-01 for ; Fri, 12 May 2006 17:27:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 8C50E9F946D for ; Fri, 12 May 2006 17:27:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k4CKR6Tv023056; Fri, 12 May 2006 16:27:06 -0400 (EDT) To: stange@rentec.com cc: Bruce Momjian , pgsql-ports@postgresql.org Subject: Re: solaris build problem with Sun compilers In-reply-to: <4464EC2D.6080406@rentec.com> References: <200605112316.k4BNGeB17324@candle.pha.pa.us> <4463D639.3030802@rentec.com> <4464B653.1040301@rentec.com> <5470.1147451501@sss.pgh.pa.us> <4464C950.40906@rentec.com> <12675.1147457431@sss.pgh.pa.us> <4464DAB0.70900@rentec.com> <15883.1147460750@sss.pgh.pa.us> <4464EC2D.6080406@rentec.com> Comments: In-reply-to Alan Stange message dated "Fri, 12 May 2006 16:12:29 -0400" Date: Fri, 12 May 2006 16:27:06 -0400 Message-ID: <23055.1147465626@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/35 X-Sequence-Number: 2416 Alan Stange writes: > - postgresql HEAD when using the Solaris compilers spro9 or newer will > only run on v9 based hardware using v8plus or v9 platform. > - postgresql HEAD when using gcc will run on anything as they generate > code for the v7 platform by default and the cas instruction isn't used > in any assembler code in postgresql. I gather from the contents of solaris_sparc.s that the Sun compilers can be expected to define __sparcv9 if compiling for v9 hardware. I'm inclined to #ifdef things so that we use cas if that symbol's defined and ldstub if not. I'm not sure if gcc can be expected to define the same symbol --- we might end up using ldstub always, even if we try to conditionalize the code for gcc. Or we could just revert to ldstub. This seems like a lot of complexity for a so-far-entirely-hypothetical performance gain ... regards, tom lane