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@lists.postgresql.org
Subject: pgsql: Update configure probes for CFLAGS needed for ARM CRC instructio
Date: Mon, 25 Nov 2024 17:50:43 +0000
Message-ID: <E1tFdER-003UpM-Nj@gemulon.postgresql.org> (raw)

Update configure probes for CFLAGS needed for ARM CRC instructions.

On ARM platforms where the baseline CPU target lacks CRC instructions,
we need to supply a -march flag to persuade the compiler to compile
such instructions.  It turns out that our existing choice of
"-march=armv8-a+crc" has not worked for some time, because recent gcc
will interpret that as selecting software floating point, and then
will spit up if the platform requires hard-float ABI, as most do
nowadays.  The end result was to silently fall back to software CRC,
which isn't very desirable since in practice almost all currently
produced ARM chips do have hardware CRC.

We can fix this by using "-march=armv8-a+crc+simd" to enable the
correct ABI choice.  (This has no impact on the code actually
generated, since neither of the files we compile with this flag
does any floating-point stuff, let alone SIMD.)  Keep the test for
"-march=armv8-a+crc" since that's required for soft-float ABI,
but try that second since most platforms we're likely to build on
use hard-float.

Since this isn't working as-intended on the last several years'
worth of gcc releases, back-patch to all supported branches.

Discussion: https://postgr.es/m/4496616.iHFcN1HehY@portable-bastien

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/32057a0f791e865df4ea5cd05ac336ef7e6f99f5

Modified Files
--------------
configure    | 47 +++++++++++++++++++++++++++++++++++++++++++++--
configure.in |  8 ++++++--
2 files changed, 51 insertions(+), 4 deletions(-)



view thread (6+ messages)

Message-ID: <E1tFdER-003UpM-Nj@gemulon.postgresql.org>
Permalink:  ../E1tFdER-003UpM-Nj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tFdER-003UpM-Nj@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Update configure probes for CFLAGS needed for ARM CRC instructio
  In-Reply-To: <E1tFdER-003UpM-Nj@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