git: c2c8157ebed7 - main - amd64: -m32 support for machine/segments.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Jun 2022 17:36:04 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c2c8157ebed76ee174b052a82b422e60b2d49b62 commit c2c8157ebed76ee174b052a82b422e60b2d49b62 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2022-06-13 17:35:39 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2022-06-13 17:35:39 +0000 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 --- include/i386/Makefile | 3 ++- sys/amd64/include/segments.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/i386/Makefile b/include/i386/Makefile index 40f272e3b8f9..e7eb0dd0c2eb 100644 --- a/include/i386/Makefile +++ b/include/i386/Makefile @@ -6,7 +6,8 @@ INCS= \ asmacros.h \ atomic.h \ cpufunc.h \ - profile.h + profile.h \ + segments.h INCSDIR= ${INCLUDEDIR}/i386 .include <bsd.prog.mk> diff --git a/sys/amd64/include/segments.h b/sys/amd64/include/segments.h index a5fd89fbf6ce..1a04774e9868 100644 --- a/sys/amd64/include/segments.h +++ b/sys/amd64/include/segments.h @@ -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__ */