diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-14 14:07:09 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-14 14:07:09 +0000 |
commit | 8e4ff341776e248f3b84ce0033e33109e67e060f (patch) | |
tree | 796227e5fc0fff4fd727e7769f269404229837f5 /sys | |
parent | 6ea34e8d76621b3a07963243bade30421938e9d4 (diff) |
Instead of using COPTS=-Oz (and similar) in make environment to force
tightly-built ramdisk kernels, set the option in per-arch Makefile.inc
based upon SMALL_KERNEL
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/conf/Makefile.alpha | 3 | ||||
-rw-r--r-- | sys/arch/amd64/conf/Makefile.amd64 | 3 | ||||
-rw-r--r-- | sys/arch/arm64/conf/Makefile.arm64 | 3 | ||||
-rw-r--r-- | sys/arch/armv7/conf/Makefile.armv7 | 3 | ||||
-rw-r--r-- | sys/arch/hppa/conf/Makefile.hppa | 6 | ||||
-rw-r--r-- | sys/arch/i386/conf/Makefile.i386 | 3 | ||||
-rw-r--r-- | sys/arch/landisk/conf/Makefile.landisk | 3 | ||||
-rw-r--r-- | sys/arch/loongson/conf/Makefile.loongson | 3 | ||||
-rw-r--r-- | sys/arch/luna88k/conf/Makefile.luna88k | 3 | ||||
-rw-r--r-- | sys/arch/macppc/conf/Makefile.macppc | 3 | ||||
-rw-r--r-- | sys/arch/octeon/conf/Makefile.octeon | 3 | ||||
-rw-r--r-- | sys/arch/sgi/conf/Makefile.sgi | 3 | ||||
-rw-r--r-- | sys/arch/socppc/conf/Makefile.socppc | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/conf/Makefile.sparc64 | 3 |
14 files changed, 33 insertions, 14 deletions
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 |