From: Bastien Roucariès <rouca@debian.org>
To: pgsql-bugs@lists.postgresql.org
Subject: Detection of hadware feature => please do not use signal
Date: Thu, 31 Oct 2024 15:41:24 +0000
Message-ID: <4496616.iHFcN1HehY@portable-bastien> (raw)
Hi,
On debian side we will like to avoid use of sigill to detect feature.
https://sources.debian.org/src/postgresql-17/17.0-1/src/port/pg_crc32c_armv8_choose.c/#L55
is really bad.
Could you use the canonical way under linux
#include <sys/auxv.h>
#include <asm/hwcap.h>
#if defined(__aarch64__)
return !(getauxval(AT_HWCAP) & HWCAP_CRC32);
#else
return !(getauxval(AT_HWCAP2) & HWCAP2_CRC32);
#endif
Thanks
Rouca
Attachments:
[application/pgp-signature] signature.asc (832B, ../4496616.iHFcN1HehY@portable-bastien/2-signature.asc)
download
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-bugs@postgresql.org
Cc: rouca@debian.org, pgsql-bugs@lists.postgresql.org
Subject: Re: Detection of hadware feature => please do not use signal
In-Reply-To: <4496616.iHFcN1HehY@portable-bastien>
* 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