diff options
| author | Mike Karels <karels@FreeBSD.org> | 2023-07-25 23:59:26 +0000 |
|---|---|---|
| committer | Mike Karels <karels@FreeBSD.org> | 2023-07-25 23:59:26 +0000 |
| commit | d5d97bed4ab6bb63e97c8ff67b5b94ae37cd24fc (patch) | |
| tree | 85e3dccc7d4d6719c866996135a58b5e238ba2da /sys/arm64/include/atomic.h | |
| parent | f1d5183124d3e18d410ded61e45adb9a23b23c83 (diff) | |
arm64 lib32: prepare arm64 headers to redirect to arm
In order to compile lib32 libraries and other 32-bit code on arm64,
<machine/foo.h> needs to be redirected to an arm header rather
than arm64 when building with -m32. Ifdef the arm64 headers that
are installed in /usr/include/machine and used by user-level software
(including references from /usr/include/*.h) so that if __arm__ is
defined when including the arm64 version, <arm/foo.h> is included
rather than using the rest of the file's contents. Some arm headers
had no arm64 equivalent; headers were added just to do the redirection.
These files use #error if __arm__ is not defined to guard against
confusion. Also add an include/arm Makefile, and modify Makefiles
as needed to install everything, including the arm files in
/usr/include/arm. fenv.h comes from lib/msun/arm/fenv.h.
The new arm64 headers are:
acle-compat.h
cpuinfo.h
sysreg.h
Reviewed by: jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D40944
Diffstat (limited to 'sys/arm64/include/atomic.h')
| -rw-r--r-- | sys/arm64/include/atomic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h index b14cd303da3a..172bf051edf3 100644 --- a/sys/arm64/include/atomic.h +++ b/sys/arm64/include/atomic.h @@ -26,6 +26,10 @@ * $FreeBSD$ */ +#ifdef __arm__ +#include <arm/atomic.h> +#else /* !__arm__ */ + #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ @@ -670,3 +674,5 @@ atomic_thread_fence_seq_cst(void) #endif /* KCSAN && !KCSAN_RUNTIME */ #endif /* _MACHINE_ATOMIC_H_ */ + +#endif /* !__arm__ */ |
