amd64: -m32 support for machine/segments.h

Install the i386 segments.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:39 +01:00
parent 08f16287a5
commit c2c8157ebe
2 changed files with 8 additions and 1 deletions

View File

@ -6,7 +6,8 @@ INCS= \
asmacros.h \
atomic.h \
cpufunc.h \
profile.h
profile.h \
segments.h
INCSDIR= ${INCLUDEDIR}/i386
.include <bsd.prog.mk>

View File

@ -36,6 +36,10 @@
* $FreeBSD$
*/
#ifdef __i386__
#include <i386/segments.h>
#else /* !__i386__ */
#ifndef _MACHINE_SEGMENTS_H_
#define _MACHINE_SEGMENTS_H_
@ -105,3 +109,5 @@ void update_gdt_fsbase(struct thread *td, uint32_t base);
#endif /* _KERNEL */
#endif /* !_MACHINE_SEGMENTS_H_ */
#endif /* __i386__ */