amd64: -m32 support for machine/cpufunc.h

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

Reviewed by:	jhb, imp
This commit is contained in:
Brooks Davis 2022-06-13 18:35:38 +01:00
parent 24983043bf
commit cca1927261
2 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,8 @@
# i386 headers installed on amd64
.PATH: ${SRCTOP}/sys/i386/include
INCS=
INCS= \
cpufunc.h
INCSDIR= ${INCLUDEDIR}/i386
.include <bsd.prog.mk>

View File

@ -38,6 +38,10 @@
* used in preference to this.
*/
#ifdef __i386__
#include <i386/cpufunc.h>
#else /* !__i386__ */
#ifndef _MACHINE_CPUFUNC_H_
#define _MACHINE_CPUFUNC_H_
@ -966,3 +970,5 @@ int wrmsr_safe(u_int msr, uint64_t newval);
#endif
#endif /* !_MACHINE_CPUFUNC_H_ */
#endif /* __i386__ */