aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2022-06-13 17:35:38 +0000
committerBrooks Davis <brooks@FreeBSD.org>2022-06-13 17:35:38 +0000
commita09ea2bbc3053d3b2afdb2f7444e5e57a96bb891 (patch)
treec7a05a230cff25af92a18ff77c1c1aa85863adc9 /include
parent43c72c45a1856c6cdf25a22d259528d5a4040973 (diff)
downloadsrc-a09ea2bbc3053d3b2afdb2f7444e5e57a96bb891.tar.gz
src-a09ea2bbc3053d3b2afdb2f7444e5e57a96bb891.zip
amd64: add an i386 include directory
This directory will hold i386-specific headers that are needed for -m32 support on amd64 and where the amd64 and i386 cases have too little in common for combining them to make sense. Files to be installed will come in later commits. With the currently required set of files, this could be done with another INCGROUP in include/Makefile, but at least one file that might want -m32 support (ieeefp.h) conflicts with a files installed in /usr/include. Reviewed by: jhb, imp
Diffstat (limited to 'include')
-rw-r--r--include/Makefile7
-rw-r--r--include/i386/Makefile7
2 files changed, 14 insertions, 0 deletions
diff --git a/include/Makefile b/include/Makefile
index 42590b900442..8d847a3a8dd2 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -8,6 +8,9 @@
PACKAGE=runtime
CLEANFILES= osreldate.h version
SUBDIR= arpa protocols rpcsvc rpc xlocale
+.if ${MACHINE_CPUARCH} == "amd64"
+SUBDIR+= i386
+.endif
SUBDIR_PARALLEL=
INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
db.h \
@@ -338,6 +341,10 @@ compat:
mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null
+.if ${MACHINE_CPUARCH} == "amd64"
+ ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${SDESTDIR}${INCLUDEDIR}/i386
+.endif
copies: .PHONY .META
cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \
diff --git a/include/i386/Makefile b/include/i386/Makefile
new file mode 100644
index 000000000000..60f70d4756b2
--- /dev/null
+++ b/include/i386/Makefile
@@ -0,0 +1,7 @@
+# i386 headers installed on amd64
+
+.PATH: ${SRCTOP}/sys/i386/include
+INCS=
+INCSDIR= ${INCLUDEDIR}/i386
+
+.include <bsd.prog.mk>