diff options
24 files changed, 53 insertions, 36 deletions
diff --git a/distrib/alpha/bsd.rd/Makefile b/distrib/alpha/bsd.rd/Makefile index 39168a4e9bd..517928d4b55 100644 --- a/distrib/alpha/bsd.rd/Makefile +++ b/distrib/alpha/bsd.rd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2019/04/05 21:08:00 deraadt Exp $ +# $OpenBSD: Makefile,v 1.32 2019/04/14 14:07:07 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -31,7 +31,7 @@ bsd.rd_unz: bsd ${IMAGE} bsd: cd ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK}/obj/bsd bsd ${IMAGE}: ${CBIN} diff --git a/distrib/alpha/common/Makefile.inc b/distrib/alpha/common/Makefile.inc index 162759f90fa..d5c1dccfa5d 100644 --- a/distrib/alpha/common/Makefile.inc +++ b/distrib/alpha/common/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.36 2019/04/05 21:08:00 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.37 2019/04/14 14:07:07 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -72,7 +72,7 @@ bsd.rd: bsd ${IMAGE} bsd: cd ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK}/obj/bsd bsd ${IMAGE}: ${CBIN} diff --git a/distrib/amd64/ramdiskA/Makefile.inc b/distrib/amd64/ramdiskA/Makefile.inc index d623deb07ef..fdb9e5341e0 100644 --- a/distrib/amd64/ramdiskA/Makefile.inc +++ b/distrib/amd64/ramdiskA/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.8 2019/04/05 21:08:00 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.9 2019/04/14 14:07:07 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -74,7 +74,7 @@ bsd.rd: mr.fs bsd bsd: cd ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS="-Oz -fno-ret-protector" ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK}/obj/bsd bsd mr.fs: instbin diff --git a/distrib/amd64/ramdisk_cd/Makefile.inc b/distrib/amd64/ramdisk_cd/Makefile.inc index a4ad30a640d..bd78f227ece 100644 --- a/distrib/amd64/ramdisk_cd/Makefile.inc +++ b/distrib/amd64/ramdisk_cd/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.8 2019/04/05 21:08:00 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.9 2019/04/14 14:07:07 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -77,7 +77,7 @@ bsd.rd: mr.fs bsd bsd: cd ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK}/obj/bsd bsd mr.fs: instbin diff --git a/distrib/i386/common/Makefile.inc b/distrib/i386/common/Makefile.inc index e755d39c92c..f273eca67a6 100644 --- a/distrib/i386/common/Makefile.inc +++ b/distrib/i386/common/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.45 2019/04/05 21:08:00 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.46 2019/04/14 14:07:07 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -57,8 +57,6 @@ unconfig: DISKTYPE?= rdroot MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 -COPTS= -Oz -mtune=i486 - bsd.gz: bsd.rd cp bsd.rd bsd.strip strip bsd.strip @@ -71,7 +69,7 @@ bsd.rd: ${IMAGE} bsd bsd: cd ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS="${COPTS}" ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK}/obj/bsd bsd ${IMAGE}: ${CBIN} diff --git a/distrib/ramdisk/Makefile b/distrib/ramdisk/Makefile index a610b4292d5..e8b20646866 100644 --- a/distrib/ramdisk/Makefile +++ b/distrib/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.53 2019/04/05 21:08:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.54 2019/04/14 14:07:07 deraadt Exp $ REV= ${OSrev} @@ -72,7 +72,7 @@ ${FLOPPY}: bsd.gz ${BOOT} ${BOOTXX} bsd: cd ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${KERNEL} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${KERNEL}/obj/bsd bsd bsd.rd: bsd ${IMAGE} diff --git a/distrib/socppc/ramdisk/Makefile b/distrib/socppc/ramdisk/Makefile index 3805c198427..9bf155b267e 100644 --- a/distrib/socppc/ramdisk/Makefile +++ b/distrib/socppc/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2019/04/05 21:08:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.19 2019/04/14 14:07:08 deraadt Exp $ REV= ${OSrev} @@ -48,7 +48,7 @@ ${IMAGE}: ${CBIN} bsd: cd ${TOP}/../../sys/arch/socppc/compile/RAMDISK && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${TOP}/../../sys/arch/socppc/compile/RAMDISK/obj/bsd bsd ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} diff --git a/distrib/sparc64/bsd.rd/Makefile b/distrib/sparc64/bsd.rd/Makefile index 15b60a0ad2c..bbd338bc0da 100644 --- a/distrib/sparc64/bsd.rd/Makefile +++ b/distrib/sparc64/bsd.rd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.36 2019/04/05 21:08:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.37 2019/04/14 14:07:08 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -30,7 +30,7 @@ bsd.rd_unz: bsd ${IMAGE} bsd: cd ${.CURDIR}/../../../sys/arch/sparc64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/${RAMDISK}/obj/bsd bsd ${IMAGE}: ${CBIN} diff --git a/distrib/sparc64/ramdisk/Makefile b/distrib/sparc64/ramdisk/Makefile index 9acd15ce1d6..054f3cdc882 100644 --- a/distrib/sparc64/ramdisk/Makefile +++ b/distrib/sparc64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.37 2019/04/05 21:08:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.38 2019/04/14 14:07:08 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -77,7 +77,7 @@ ${IMAGE}: ${CBIN} bsd: cd ${TOP}/../../sys/arch/sparc64/compile/${KERNEL} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env ${MAKE}' cp -p ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/obj/bsd bsd unconfig: diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile index 940f5a1801e..b6efc0a0a6a 100644 --- a/distrib/sparc64/ramdiskB/Makefile +++ b/distrib/sparc64/ramdiskB/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2019/04/05 21:08:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.32 2019/04/14 14:07:08 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -77,7 +77,7 @@ ${IMAGE}: ${CBIN} bsd: cd ${TOP}/../../sys/arch/sparc64/compile/${KERNEL} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' cp -p ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/obj/bsd bsd unconfig: diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha index d3981b65b2c..25642a5991c 100644 --- a/sys/arch/alpha/conf/Makefile.alpha +++ b/sys/arch/alpha/conf/Makefile.alpha @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.alpha,v 1.111 2018/02/09 03:59:15 tb Exp $ +# $OpenBSD: Makefile.alpha,v 1.112 2019/04/14 14:07:05 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -37,6 +37,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index 283fa236422..52c328d836d 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.112 2019/04/14 10:14:50 jsg Exp $ +# $OpenBSD: Makefile.amd64,v 1.113 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -41,6 +41,7 @@ CMACHFLAGS+= -msave-args .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .if ${COMPILER_VERSION:Mclang} CMACHFLAGS+= -mno-retpoline .endif diff --git a/sys/arch/arm64/conf/Makefile.arm64 b/sys/arch/arm64/conf/Makefile.arm64 index d4cf1906856..8e9a5aa27f9 100644 --- a/sys/arch/arm64/conf/Makefile.arm64 +++ b/sys/arch/arm64/conf/Makefile.arm64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.arm64,v 1.31 2019/04/14 10:14:50 jsg Exp $ +# $OpenBSD: Makefile.arm64,v 1.32 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -40,6 +40,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index 4686ba9227d..f6eb7d153f7 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armv7,v 1.43 2018/10/30 11:10:03 kettenis Exp $ +# $OpenBSD: Makefile.armv7,v 1.44 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -40,6 +40,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif .if ${COMPILER_VERSION:Mclang} NO_INTEGR_AS= -no-integrated-as diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa index 3bbf488cbed..ed7e29c17d5 100644 --- a/sys/arch/hppa/conf/Makefile.hppa +++ b/sys/arch/hppa/conf/Makefile.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hppa,v 1.105 2018/02/09 03:59:15 tb Exp $ +# $OpenBSD: Makefile.hppa,v 1.106 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -31,6 +31,10 @@ CMACHFLAGS= -mfast-indirect-calls -mportable-runtime -mno-space-regs CMACHFLAGS+= -ffreestanding ${NOPIE_FLAGS} CMACHFLAGS+= -fno-stack-protector SORTR= sort -R +.if ${IDENT:M-DSMALL_KERNEL} +SORTR= cat +COPTS?= -Oz +.endif DEBUG?= -g COPTS?= -O2 diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index a94d8d1489a..aa16c4b42fc 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.133 2019/04/14 10:14:50 jsg Exp $ +# $OpenBSD: Makefile.i386,v 1.134 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -37,6 +37,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz -mtune=i486 -mno-retpoline .elif ${COMPILER_VERSION:Mclang} CMACHFLAGS+= -mretpoline .endif diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk index 9cec25aae9e..3e6496b2d15 100644 --- a/sys/arch/landisk/conf/Makefile.landisk +++ b/sys/arch/landisk/conf/Makefile.landisk @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.landisk,v 1.77 2018/02/09 03:59:15 tb Exp $ +# $OpenBSD: Makefile.landisk,v 1.78 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -37,6 +37,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index 907761098a5..438d3a0d8c9 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.74 2019/04/14 10:14:50 jsg Exp $ +# $OpenBSD: Makefile.loongson,v 1.75 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -44,6 +44,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k index 0afdfea3817..9d9ffce5b8a 100644 --- a/sys/arch/luna88k/conf/Makefile.luna88k +++ b/sys/arch/luna88k/conf/Makefile.luna88k @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.luna88k,v 1.80 2018/02/09 03:59:15 tb Exp $ +# $OpenBSD: Makefile.luna88k,v 1.81 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -37,6 +37,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc index d700515a569..b3f66ee3845 100644 --- a/sys/arch/macppc/conf/Makefile.macppc +++ b/sys/arch/macppc/conf/Makefile.macppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.macppc,v 1.95 2019/04/14 10:14:50 jsg Exp $ +# $OpenBSD: Makefile.macppc,v 1.96 2019/04/14 14:07:06 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -39,6 +39,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index b0f6aee3e21..03e049f0d80 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.52 2019/01/14 16:27:19 visa Exp $ +# $OpenBSD: Makefile.octeon,v 1.53 2019/04/14 14:07:07 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -42,6 +42,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index c91f9f5cad7..8b099e9e4c0 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.97 2019/01/14 16:27:19 visa Exp $ +# $OpenBSD: Makefile.sgi,v 1.98 2019/04/14 14:07:07 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -42,6 +42,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif DEBUG?= -g diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc index 6f2c68f2649..eab2c0302e7 100644 --- a/sys/arch/socppc/conf/Makefile.socppc +++ b/sys/arch/socppc/conf/Makefile.socppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.socppc,v 1.59 2018/02/09 03:59:15 tb Exp $ +# $OpenBSD: Makefile.socppc,v 1.60 2019/04/14 14:07:07 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,6 +34,9 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ .if ${IDENT:M-DNO_PROPOLICE} CMACHFLAGS+= -fno-stack-protector .endif +.if ${IDENT:M-DSMALL_KERNEL} +COPTS?= -Oz +.endif DEBUG?= -g COPTS?= -O2 diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 0eb98c76cf5..58896c6e31e 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc64,v 1.99 2019/04/14 10:14:50 jsg Exp $ +# $OpenBSD: Makefile.sparc64,v 1.100 2019/04/14 14:07:07 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -41,6 +41,7 @@ CMACHFLAGS+= -fno-stack-protector .endif .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat +COPTS?= -Oz .endif .if ${COMPILER_VERSION:Mclang} CWARNFLAGS+= -Wno-unused-command-line-argument |