Detection of hadware feature => please do not use signal
Bastien Roucariès <rouca@debian.org>
From: Bastien Roucariès <rouca@debian.org>
To: pgsql-bugs@lists.postgresql.org
Date: 2024-10-31T15:41:24Z
Lists: pgsql-bugs
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
Commits
-
Update configure probes for CFLAGS needed for ARM CRC instructions.
- e266a0ed67d2 17.3 landed
- 851c6ff18fd3 15.11 landed
- 5980f1884fc9 18.0 landed
- 32057a0f791e 13.19 landed
- 2fc0199a5015 14.16 landed
- 1f4aadec41b8 16.7 landed
-
Support runtime CRC feature probing on NetBSD/ARM using sysctl().
- 4570b22666dd 18.0 landed
-
Use auxv to check for CRC32 instructions on ARM.
- aac831cafa6f 18.0 landed
-
Improve our method for probing the availability of ARM CRC instructions.
- 1c72ec6f4989 11.0 cited