pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Extend configure's __int128 test to check for a known gcc bug.
Date: Thu, 18 Jan 2018 16:10:00 +0000
Message-ID: <E1ecClM-0006Gv-VO@gemulon.postgresql.org> (raw)

Extend configure's __int128 test to check for a known gcc bug.

On Sparc64, use of __attribute__(aligned(8)) with __int128 causes faulty
code generation in gcc versions at least through 5.5.0.  We can work around
that by disabling use of __int128, so teach configure to test for the bug.

This solution doesn't fix things for the case of cross-compiling with a
buggy compiler; to support that nicely, we'd need to add a manual disable
switch.  Unless more such cases turn up, it doesn't seem worth the work.
Affected users could always edit pg_config.h manually.

In passing, fix some typos in the existing configure test for __int128.
They're harmless because we only compile that code not run it, but
they're still confusing for anyone looking at it closely.

This is needed in support of commit 751804998, so back-patch to 9.5
as that was.

Marina Polyakova, Victor Wagner, Tom Lane

Discussion: https://postgr.es/m/0d3a9fa264cebe1cb9966f37b7c06e86@postgrespro.ru

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5dcbdcbdda488b53768a3093481a2f7d8210cc51

Modified Files
--------------
config/c-compiler.m4 | 48 +++++++++++++++++++++++++++++------
configure            | 72 +++++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 105 insertions(+), 15 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1ecClM-0006Gv-VO@gemulon.postgresql.org>
Permalink:  ../E1ecClM-0006Gv-VO@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ecClM-0006Gv-VO@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Extend configure's __int128 test to check for a known gcc bug.
  In-Reply-To: <E1ecClM-0006Gv-VO@gemulon.postgresql.org>
  References: <E1ecClM-0006Gv-VO@gemulon.postgresql.org>

* 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