diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-10-14 18:43:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-10-14 18:43:03 +0000 |
commit | 645eff3a855254a1fd4271016d679ddf41bda9b5 (patch) | |
tree | 0d9ce821aa8023f5b24efd533b7ba7701d8a6cb1 /sys/arch/sgi | |
parent | 1f9195d8cf739e4124db4512200c8278bbda6957 (diff) |
Kernel builds now happen in compile/CONFIG/obj@ -> /usr/obj/... [or ./obj/,
if srctree is not rooted at /usr/src]. As a result, stock GENERIC & RAMDISK
kernels are commited to the tree, to ensure the src tree can be "readonly"
during builds, with all writes occuring inside the obj space. config -b
options are handled by ../Makefile.inc. The canonical new way to configure
one of these kernels is:
% cd /sys/arch/amd64/compile/GENERIC.MP
% doas make obj
% make config
% make
% doas cp obj/bsd /bsd
The build infrastructure will use this new mechanism in a de-escalation
way using BUILDUSER.
Much help from natano and tb.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/sgi/compile/.cvsignore | 14 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP22/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP26/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP27/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP28/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP30/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/GENERIC-IP32/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/Makefile | 11 | ||||
-rw-r--r-- | sys/arch/sgi/compile/Makefile.inc | 19 | ||||
-rw-r--r-- | sys/arch/sgi/compile/RAMDISK-IP22/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/RAMDISK-IP26/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/RAMDISK-IP27/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/RAMDISK-IP28/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/RAMDISK-IP30/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/compile/RAMDISK-IP32/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/sgi/conf/Makefile.sgi | 6 |
19 files changed, 50 insertions, 18 deletions
diff --git a/sys/arch/sgi/Makefile b/sys/arch/sgi/Makefile index 9456f0badb6..8fd1e04fa30 100644 --- a/sys/arch/sgi/Makefile +++ b/sys/arch/sgi/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2016/05/31 18:37:04 tedu Exp $ +# $OpenBSD: Makefile,v 1.10 2016/10/14 18:42:59 deraadt Exp $ S= ${.CURDIR}/../.. KFILE= GENERIC-IP30 @@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags NOPROG= NOMAN= NOOBJ= -SUBDIR= stand +SUBDIR= stand compile # config the fattest kernel we can find into a temporary dir # to create a Makefile. Then use make to pull some variables diff --git a/sys/arch/sgi/compile/.cvsignore b/sys/arch/sgi/compile/.cvsignore deleted file mode 100644 index 74dcc58ecef..00000000000 --- a/sys/arch/sgi/compile/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -GENERIC-IP22 -GENERIC-IP26 -GENERIC-IP27 -GENERIC-IP27.MP -GENERIC-IP28 -GENERIC-IP30 -GENERIC-IP30.MP -GENERIC-IP32 -RAMDISK-IP22 -RAMDISK-IP26 -RAMDISK-IP27 -RAMDISK-IP28 -RAMDISK-IP30 -RAMDISK-IP32 diff --git a/sys/arch/sgi/compile/GENERIC-IP22/Makefile b/sys/arch/sgi/compile/GENERIC-IP22/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP22/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP26/Makefile b/sys/arch/sgi/compile/GENERIC-IP26/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP26/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile b/sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP27/Makefile b/sys/arch/sgi/compile/GENERIC-IP27/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP27/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP28/Makefile b/sys/arch/sgi/compile/GENERIC-IP28/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP28/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile b/sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP30/Makefile b/sys/arch/sgi/compile/GENERIC-IP30/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP30/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/GENERIC-IP32/Makefile b/sys/arch/sgi/compile/GENERIC-IP32/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/GENERIC-IP32/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/Makefile b/sys/arch/sgi/compile/Makefile new file mode 100644 index 00000000000..0f147f11628 --- /dev/null +++ b/sys/arch/sgi/compile/Makefile @@ -0,0 +1,11 @@ +# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:00 deraadt Exp $ + +.if make(obj) || make(clean) +SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \) +#SUBDIR=GENERIC-IP22 GENERIC-IP26 GENERIC-IP27 GENERIC-IP27.MP \ +# GENERIC-IP28 GENERIC-IP30 GENERIC-IP30.MP GENERIC-IP32 \ +# RAMDISK-IP22 RAMDISK-IP26 RAMDISK-IP27 RAMDISK-IP28 \ +# RAMDISK-IP30 RAMDISK-IP32 +.endif + +.include <bsd.subdir.mk> diff --git a/sys/arch/sgi/compile/Makefile.inc b/sys/arch/sgi/compile/Makefile.inc new file mode 100644 index 00000000000..d79a8803ef2 --- /dev/null +++ b/sys/arch/sgi/compile/Makefile.inc @@ -0,0 +1,19 @@ +SYSDIR != cd ${.CURDIR}/../../../..; pwd +CONFDIR != cd ${.CURDIR}/../../conf; pwd + +.if ${.CURDIR} == ${.OBJDIR} +.PHONY: config +config: + @echo make obj required first >&2 + @false +.elif !exists(${OBJDIR}/Makefile) +.PHONY: config clean +config: + config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T} + +clean: + +.endif + +.include <bsd.obj.mk> + diff --git a/sys/arch/sgi/compile/RAMDISK-IP22/Makefile b/sys/arch/sgi/compile/RAMDISK-IP22/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/RAMDISK-IP22/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/RAMDISK-IP26/Makefile b/sys/arch/sgi/compile/RAMDISK-IP26/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/RAMDISK-IP26/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/RAMDISK-IP27/Makefile b/sys/arch/sgi/compile/RAMDISK-IP27/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/RAMDISK-IP27/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/RAMDISK-IP28/Makefile b/sys/arch/sgi/compile/RAMDISK-IP28/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/RAMDISK-IP28/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/RAMDISK-IP30/Makefile b/sys/arch/sgi/compile/RAMDISK-IP30/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/RAMDISK-IP30/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/compile/RAMDISK-IP32/Makefile b/sys/arch/sgi/compile/RAMDISK-IP32/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/sgi/compile/RAMDISK-IP32/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index b199dcdbffa..3a2b7e8c106 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.71 2016/09/24 19:13:03 kettenis Exp $ +# $OpenBSD: Makefile.sgi,v 1.72 2016/10/14 18:43:02 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -28,7 +28,7 @@ S!= cd ../../../..; pwd _machdir?= $S/arch/${_mach} _archdir?= $S/arch/${_arch} -INCLUDES= -nostdinc -I$S -I. -I$S/arch +INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-main -Wno-uninitialized -Wno-pointer-sign \ @@ -137,6 +137,8 @@ symbols.sort: ${_machdir}/${_mach}/symbols.raw grep -v '^#' ${_machdir}/${_mach}/symbols.raw \ | sed 's/^ //' | sort -u > symbols.sort +obj: + depend: @touch $@ |