From: Bastien Roucariès <rouca@debian.org>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Detection of hadware feature => please do not use signal
Date: Fri, 08 Nov 2024 08:56:45 +0000
Message-ID: <16872859.Zp9ysIU8Tl@portable-bastien> (raw)
In-Reply-To: <CA+hUKGKrfMUuhQNqT5WhQYfu5JhtKkfW62WbELTnLi8xbk9=Kg@mail.gmail.com>
References: <4496616.iHFcN1HehY@portable-bastien>
<4188473.jn8P2z2zlG@portable-bastien>
<CA+hUKGKrfMUuhQNqT5WhQYfu5JhtKkfW62WbELTnLi8xbk9=Kg@mail.gmail.com>
Le jeudi 7 novembre 2024, 23:43:45 UTC Thomas Munro a écrit :
> On Fri, Nov 8, 2024 at 4:51 AM Bastien Roucariès <rouca@debian.org> wrote:
> > Le jeudi 7 novembre 2024, 00:01:58 UTC Thomas Munro a écrit :
> > > It doesn't look like I need to include <asm/hwcap.h> from Bastien's
> > > original message, because <sys/auxv.h> pulls in <bits/hwcap.h>
>
> > Not on arm32 unfortunatly.... and it is a HWCAP2_flags
>
> Ah, that is unfortunate. I was confused about whether we even used
> this code on armv7/aarch32 builds, but I see that we do. OK, here is
> a version like that.
I will guard the include by replacing
+#if defined(__linux__) && !defined(__aarch64__)
by
+#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)
>
> I also noticed that the Linux docs explicitly tell you that SIGILL is
> unreliable for this purpose:
>
> https://docs.kernel.org/arch/arm64/elf_hwcaps.html
>
Bastien
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, thomas.munro@gmail.com, tgl@sss.pgh.pa.us, hlinnaka@iki.fi
Subject: Re: Detection of hadware feature => please do not use signal
In-Reply-To: <16872859.Zp9ysIU8Tl@portable-bastien>
References: <4496616.iHFcN1HehY@portable-bastien> <4188473.jn8P2z2zlG@portable-bastien> <CA+hUKGKrfMUuhQNqT5WhQYfu5JhtKkfW62WbELTnLi8xbk9=Kg@mail.gmail.com> <16872859.Zp9ysIU8Tl@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