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:
signature.asc (application/pgp-signature, 832B) 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 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: rouca@debian.org
Subject: Re: Detection of hadware feature => please do not use signal
In-Reply-To: <4496616.iHFcN1HehY@portable-bastien>
References: <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