pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [BUGS] Compile fails on AIX 6.1
Date: Fri, 28 Aug 2015 03:02:03 -0400
Message-ID: <20150828070203.GA2534837@tornado.leadboat.com> (raw)
In-Reply-To: <14934.1440686206@sss.pgh.pa.us>
References: <1823346352.314711.1405443099463.open-xchange@oxbaltgw55.schlund.de>
	<14934.1440686206@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote:
> the problem is that
> IBM's assembler doesn't understand the "local symbol" notation supported
> by the GNU assembler ("bne 1f" referencing the next occurrence of "1:").
> So s_lock.h's PowerPC assembly code works if you have gcc configured to
> use gas as backend, but not if it's configured to use the native AIX
> assembler.  Steve says the latter configuration is pretty common.

These days, the latter configuration is all but universal.  Per the GCC
installation instructions, "The GNU Assembler has not been updated to support
AIX 6 or AIX 7."

> So now that we know what is happening, what do we want to do about it?
> AFAICS there are two plausible ways to fix it:
> 
> 1. Add a configure-time test to see if the assembler supports local
> symbols.  If not, don't try to use the lwarx assembly stanza, but let
> it fall through to using _check_lock().  This would be simple but
> there would presumably be some performance hit.
> 
> 2. Don't rely on local symbols in the PPC spinlock assembly code.  This
> is a bit ugly, because the only way to do that is to hard-code branch
> offsets, as in the attached draft patch.  If there were any likelihood
> that we'd be changing the PPC spinlock code in future, I would regard
> this as unmaintainable ... but really, that code is pretty static.
> So I think this is a viable alternative.

A third option is to use __sync intrinsics, like we do on ARM.  I like (2).


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (30+ messages)  latest in thread

Message-ID: <20150828070203.GA2534837@tornado.leadboat.com>
Permalink:  ../20150828070203.GA2534837@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20150828070203.GA2534837@tornado.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noah@leadboat.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
  Subject: Re: [BUGS] Compile fails on AIX 6.1
  In-Reply-To: <20150828070203.GA2534837@tornado.leadboat.com>
  References: <1823346352.314711.1405443099463.open-xchange@oxbaltgw55.schlund.de> <14934.1440686206@sss.pgh.pa.us> <20150828070203.GA2534837@tornado.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox