mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Enable use of elf_aux_info() to detect CPU features on aarch64 and powerpc64
This commit is contained in:
parent
729b27d390
commit
f66cd044d5
2 changed files with 8 additions and 6 deletions
|
|
@ -33,7 +33,7 @@ my_crc32_t crc32c_aarch64_available(void)
|
|||
}
|
||||
# else
|
||||
# include <sys/auxv.h>
|
||||
# ifdef __FreeBSD__
|
||||
# if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
static unsigned long getauxval(unsigned int key)
|
||||
{
|
||||
unsigned long val;
|
||||
|
|
|
|||
|
|
@ -455,10 +455,12 @@ static int arch_ppc_probe(void) {
|
|||
|
||||
return arch_ppc_crc32;
|
||||
}
|
||||
# elif defined __FreeBSD__
|
||||
# include <machine/cpu.h>
|
||||
# elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
# include <sys/auxv.h>
|
||||
# include <sys/elf_common.h>
|
||||
# ifdef __FreeBSD__
|
||||
# include <machine/cpu.h>
|
||||
# include <sys/elf_common.h>
|
||||
# endif
|
||||
static int arch_ppc_probe(void) {
|
||||
unsigned long cpufeatures;
|
||||
arch_ppc_crc32 = 0;
|
||||
|
|
@ -470,12 +472,12 @@ static int arch_ppc_probe(void) {
|
|||
|
||||
return arch_ppc_crc32;
|
||||
}
|
||||
# elif defined(_AIX) || defined(__OpenBSD__)
|
||||
# elif defined(_AIX)
|
||||
static int arch_ppc_probe(void) {
|
||||
arch_ppc_crc32 = 0;
|
||||
|
||||
# if defined(__powerpc64__)
|
||||
// AIX 7.1+/OpenBSD has vector crypto features on all POWER 8+
|
||||
// AIX 7.1+ has vector crypto features on all POWER 8+
|
||||
arch_ppc_crc32 = 1;
|
||||
# endif /* __powerpc64__ */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue