From 016712db49661ac9e6e9248772ea25545fa041aa Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 13 Jun 2017 16:40:00 +0000 Subject: [PATCH] newbsd: target which re-links a kernel. We cannot use the bsd: target since it has source dependencies, and relinking doesn't have any. Also the bsd: target is created by config(8)... worked on with rpe. --- sys/arch/alpha/conf/Makefile.alpha | 8 +++++++- sys/arch/amd64/conf/Makefile.amd64 | 8 +++++++- sys/arch/arm64/conf/Makefile.arm64 | 8 +++++++- sys/arch/armv7/conf/Makefile.armv7 | 8 +++++++- sys/arch/hppa/conf/Makefile.hppa | 8 +++++++- sys/arch/i386/conf/Makefile.i386 | 8 +++++++- sys/arch/landisk/conf/Makefile.landisk | 8 +++++++- sys/arch/loongson/conf/Makefile.loongson | 8 +++++++- sys/arch/octeon/conf/Makefile.octeon | 8 +++++++- sys/arch/sgi/conf/Makefile.sgi | 8 +++++++- sys/arch/sparc64/conf/Makefile.sparc64 | 8 +++++++- 11 files changed, 77 insertions(+), 11 deletions(-) diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha index deca2ef35e0..6fbabd80d2c 100644 --- a/sys/arch/alpha/conf/Makefile.alpha +++ b/sys/arch/alpha/conf/Makefile.alpha @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.alpha,v 1.100 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.alpha,v 1.101 2017/06/13 16:40:00 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -93,6 +93,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index f91d588bff6..22e4488f042 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.83 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.amd64,v 1.84 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -96,6 +96,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/arm64/conf/Makefile.arm64 b/sys/arch/arm64/conf/Makefile.arm64 index f9fa3685748..01e94b7b237 100644 --- a/sys/arch/arm64/conf/Makefile.arm64 +++ b/sys/arch/arm64/conf/Makefile.arm64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.arm64,v 1.13 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.arm64,v 1.14 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -94,6 +94,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index de7f7c52ba6..bd893b46c5d 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armv7,v 1.25 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.armv7,v 1.26 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -86,6 +86,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa index 4ce493dfb09..fa768b4b18b 100644 --- a/sys/arch/hppa/conf/Makefile.hppa +++ b/sys/arch/hppa/conf/Makefile.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hppa,v 1.94 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.hppa,v 1.95 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -101,6 +101,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 04c45e8ea42..7ec7d6cbaa3 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.109 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.i386,v 1.110 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -97,6 +97,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk index fa7f27669eb..96bafd7922e 100644 --- a/sys/arch/landisk/conf/Makefile.landisk +++ b/sys/arch/landisk/conf/Makefile.landisk @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.landisk,v 1.66 2017/06/13 15:37:30 deraadt Exp $ +# $OpenBSD: Makefile.landisk,v 1.67 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -93,6 +93,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index fc93bd98706..8c6a926b005 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.59 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.loongson,v 1.60 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -98,6 +98,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index 102664e1cdb..2961017a2f0 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.35 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.octeon,v 1.36 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -99,6 +99,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index 6bddf6ea7e5..99b390159cd 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.83 2017/06/11 22:51:21 deraadt Exp $ +# $OpenBSD: Makefile.sgi,v 1.84 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -98,6 +98,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 935fe5761a0..f24028fb23f 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc64,v 1.86 2017/06/13 00:16:09 deraadt Exp $ +# $OpenBSD: Makefile.sparc64,v 1.87 2017/06/13 16:40:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -91,6 +91,12 @@ LINKFLAGS+= -S %LOAD +newbsd: + ${SYSTEM_LD_HEAD} + ${SYSTEM_LD} swapgeneric.o + ${SYSTEM_LD_TAIL} + mv -f newbsd bsd + # cc's -MD puts the source and output paths in the dependency file; # since those are temp files here we need to fix it up. It also # puts the file in /tmp, so we use -MF to put it in the current -- 2.20.1