Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZVDhH-0006qv-FK for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2015 07:03:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZVDhG-000475-2E for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2015 07:03:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZVDfx-0002cm-0n for pgsql-hackers@postgresql.org; Fri, 28 Aug 2015 07:02:13 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZVDft-0006ac-AZ for pgsql-hackers@postgresql.org; Fri, 28 Aug 2015 07:02:11 +0000 Received: by pacgr6 with SMTP id gr6so16239439pac.3 for ; Fri, 28 Aug 2015 00:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Heh/DJl5o6pR1JAScQ/7Iry6MYAR1izy5PwD3fJwyN8=; b=f1yjzwHFp85IS3TKbpWcv2FPx9jkyNab9O05+5GCVj1KtRVUli7Ui/T3PShgid2VBd X8X1K78Iy4Um4k0wYys1IxsINkhNej8swAJsk52JB+OLOaWrINXlj5f2WAf/3tCkXBpZ V5XHiZ6Heu87ESSyka1NmfI+M0bARCQeBW8RY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Heh/DJl5o6pR1JAScQ/7Iry6MYAR1izy5PwD3fJwyN8=; b=C/y7U7IVZyk4ohWjgB9JSyjBvllZqsLC/bb7Mo921zPaE+OsatxkVLXHkOYvAmWnbo ocBMej4lT3/BOHn3Woksu7dMQf7h1dbvnF0KFtchu4r5cBQ5CJdiKJNmX4U0elRQ+Z0D lEcsm4nziXWc/FZrlv8hNLw/ruta6D70d8qEOLCSqqCH6No2A17e3ebs/BrmjPwElwEj 2Gipj7UvY/OzNhFDtaLtWQ2NLxMeVo5qT/7EBJ0W6vPWYBJJdDGjl8vie4EppQIBRa4Z 8gFE5sWLiFxFd0cz8gUt4Mjiq8acjHECwPM2EsPg/eb/A8j5l5gBoyohEtNEZ39bozup 2MVQ== X-Gm-Message-State: ALoCoQnnuRvct/sW8+oZkaYf8hiwBqH97De4CFXR/2J7LkapjrR3k636ZQHi0CYZd+ccYaZJ+18U X-Received: by 10.66.162.162 with SMTP id yb2mr13088953pab.122.1440745326008; Fri, 28 Aug 2015 00:02:06 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id hx7sm4574310pbc.84.2015.08.28.00.02.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Aug 2015 00:02:05 -0700 (PDT) Date: Fri, 28 Aug 2015 03:02:03 -0400 From: Noah Misch To: Tom Lane Cc: pgsql-hackers@postgreSQL.org Subject: Re: [BUGS] Compile fails on AIX 6.1 Message-ID: <20150828070203.GA2534837@tornado.leadboat.com> References: <1823346352.314711.1405443099463.open-xchange@oxbaltgw55.schlund.de> <14934.1440686206@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14934.1440686206@sss.pgh.pa.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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