[all-commits] [llvm/llvm-project] 953ae9: [builtins] Fix CPU feature detection for FreeBSD o...
Dimitry Andric via All-commits
all-commits at lists.llvm.org
Fri Dec 29 02:13:54 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 953ae94149f09ed1bac189b4d2b790de6b98c60e
https://github.com/llvm/llvm-project/commit/953ae94149f09ed1bac189b4d2b790de6b98c60e
Author: Dimitry Andric <dimitry at andric.com>
Date: 2023-12-29 (Fri, 29 Dec 2023)
Changed paths:
M compiler-rt/lib/builtins/cpu_model/aarch64.c
Log Message:
-----------
[builtins] Fix CPU feature detection for FreeBSD on AArch64 (#76532)
[builtins] Fix CPU feature detection for FreeBSD on AArch64
This is a follow-up to #75635 which broke the build for FreeBSD on
AArch64:
```
compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/freebsd.inc:3:16: error: call to undeclared function 'elf_aux_info'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
3 | int result = elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap);
| ^
```
Using `elf_aux_info()` requires including `<sys/auxv.h>` first. To
prevent redeclaration issues with `hwcap.inc` attempting to define
`HWCAP_xxx` macros before `<sys/auxv.h>` does so, include `<sys/auxv.h>`
before any of the `.inc` files on FreeBSD.
More information about the All-commits
mailing list