Re: Detection of hadware feature => please do not use signal - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: Detection of hadware feature => please do not use signal
Date
Msg-id CA+hUKG+8XZqi1fM+SbeecAKrj+Zc+BPt41qhvo3a-G3wHzafbQ@mail.gmail.com
Whole thread Raw
In response to Re: Detection of hadware feature => please do not use signal  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-bugs
On Fri, Nov 8, 2024 at 4:28 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
> One small improvement in this area that I'm working on (and about to commit
> for the AVX-512 stuff) is using __attribute__((target(...))) instead of
> special -march options for specific files [0].

(Catching up with that stuff).  Neat.

I tried sprinkling __attribute__((target_clones("default,lse"))) in
front of some functions like LWLockAquire() just to see if this
multifunction stuff worked enough yet on ARM.  FreeBSD 15/clang 18:
yes, I got LSE CAS-based lwlocks with loader-time feature detection!
Debian 12/gcc 12: no, it fails with "error: target does not support
function version dispatcher".  I think maybe gcc 14 will do it (from
quick look at release notes)?  I realise that's yet a different issue
than the <arm_acle.h> visibility thing you mentioned for the CRC32
builtins.  Anyway, it's apparently still too soon to help on all
systems with this specific topic as you already said, so the explicit
auxv check still looks like the only reasonable way for now.



pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Segmentation fault - PostgreSQL 17.0
Next
From: PG Bug reporting form
Date:
Subject: BUG #18698: Checksum verification failed for: deb_postgis_3_4_pg16.app.zip