amd64: -m32 support for machine/pcpu.h

Install the i386 pcpu.h under /usr/include/i386 on amd64 and include
when targeting i386.

This is a kernel-only header and should not be required, but
procstat's zfs support includes this with _KERNEL defined.

Reviewed by:	jhb, imp
This commit is contained in:
Brooks Davis 2022-06-13 18:35:40 +01:00
parent a29263b656
commit f6fada5eed
2 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,10 @@ INCS= \
profile.h \
segments.h \
vmparam.h
# These kernel-only headers are used by procstat's ZFS support.
# This should be fixed.
INCS+= \
pcpu.h
INCSDIR= ${INCLUDEDIR}/i386
.include <bsd.prog.mk>

View File

@ -28,6 +28,10 @@
* $FreeBSD$
*/
#ifdef __i386__
#include <i386/pcpu.h>
#else /* !__i386__ */
#ifndef _MACHINE_PCPU_H_
#define _MACHINE_PCPU_H_
@ -274,3 +278,5 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line");
#endif /* _KERNEL */
#endif /* !_MACHINE_PCPU_H_ */
#endif /* __i386__ */