Again allow COPTS= to come from the environment again, and don't lose the
authorderaadt <deraadt@openbsd.org>
Thu, 28 Jan 2021 17:39:01 +0000 (17:39 +0000)
committerderaadt <deraadt@openbsd.org>
Thu, 28 Jan 2021 17:39:01 +0000 (17:39 +0000)
SMALL_KERNEL specific variations.
ok espie jsg

14 files changed:
sys/arch/alpha/conf/Makefile.alpha
sys/arch/amd64/conf/Makefile.amd64
sys/arch/arm64/conf/Makefile.arm64
sys/arch/armv7/conf/Makefile.armv7
sys/arch/hppa/conf/Makefile.hppa
sys/arch/i386/conf/Makefile.i386
sys/arch/landisk/conf/Makefile.landisk
sys/arch/loongson/conf/Makefile.loongson
sys/arch/luna88k/conf/Makefile.luna88k
sys/arch/macppc/conf/Makefile.macppc
sys/arch/octeon/conf/Makefile.octeon
sys/arch/powerpc64/conf/Makefile.powerpc64
sys/arch/sgi/conf/Makefile.sgi
sys/arch/sparc64/conf/Makefile.sparc64

index 07e6f17..4610e49 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.alpha,v 1.114 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.alpha,v 1.115 2021/01/28 17:39:01 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -37,12 +37,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script -X -N -G 4 --warn-common -nopie
 
index e6f0973..e6c6d91 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.amd64,v 1.118 2020/06/08 04:47:57 jsg Exp $
+#      $OpenBSD: Makefile.amd64,v 1.119 2021/01/28 17:39:02 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -58,7 +58,7 @@ CMACHFLAGS+=  -msave-args
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE=     -Oz
 .if ${COMPILER_VERSION:Mclang}
 CMACHFLAGS+=   -mno-retpoline
 .endif
@@ -69,8 +69,8 @@ CWARNFLAGS+=  -Wno-address-of-packed-member -Wno-constant-conversion
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script -X --warn-common -nopie
 
index f35a39e..6dc9e40 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.arm64,v 1.36 2020/06/08 04:47:58 jsg Exp $
+#      $OpenBSD: Makefile.arm64,v 1.37 2021/01/28 17:39:02 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -56,12 +56,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script -X --warn-common -nopie
 
index 6d2f7b1..79f89e1 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.armv7,v 1.48 2019/11/09 19:59:53 guenther Exp $
+#      $OpenBSD: Makefile.armv7,v 1.49 2021/01/28 17:39:02 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -36,12 +36,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script --warn-common -nopie
 
index 23f0d7a..44bc65b 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.hppa,v 1.108 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.hppa,v 1.109 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -33,12 +33,12 @@ CMACHFLAGS+=        -fno-stack-protector
 SORTR=         sort -R
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -X -T ld.script -Ttext 80000 --warn-common -nopie
 
index 00e00a3..d8ab48f 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.i386,v 1.139 2020/08/17 17:23:59 deraadt Exp $
+#      $OpenBSD: Makefile.i386,v 1.140 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -38,7 +38,7 @@ CMACHFLAGS+=  -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz -mno-retpoline
+COPTIMIZE?=    -Oz -mno-retpoline
 .elif ${COMPILER_VERSION:Mclang}
 CMACHFLAGS+=   -mretpoline
 .endif
@@ -48,8 +48,8 @@ CWARNFLAGS+=  -Wno-address-of-packed-member -Wno-constant-conversion
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script -X --warn-common -nopie
 
index 2402780..0a975c2 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.landisk,v 1.81 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.landisk,v 1.82 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -37,12 +37,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-#COPTS?=       -Oz # locks up during boot
+#COPTIMIZE?=-Oz # locks up during boot
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -N -Ttext 0x8c002000 -e start --warn-common -nopie
 
index 6cf4a11..ef0c4a6 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.loongson,v 1.79 2020/12/22 04:32:08 visa Exp $
+#      $OpenBSD: Makefile.loongson,v 1.80 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -44,7 +44,7 @@ CMACHFLAGS+=  -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 .if ${COMPILER_VERSION:Mclang}
 NO_INTEGR_AS=  -no-integrated-as
@@ -53,8 +53,8 @@ CWARNFLAGS+=  -Wno-address-of-packed-member -Wno-constant-conversion
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -e start -T ld.script -Ttext=${LINK_ADDRESS} -warn-common -nopie
 
index 57ef138..d32a29c 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.luna88k,v 1.83 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.luna88k,v 1.84 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -37,12 +37,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script -Ttext 0x80000 -e __start -X -N --warn-common -nopie
 
index f994ef6..9db16c5 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.macppc,v 1.100 2020/11/29 18:57:29 gkoehler Exp $
+#      $OpenBSD: Makefile.macppc,v 1.101 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -40,7 +40,7 @@ CMACHFLAGS+=  -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 .if ${COMPILER_VERSION:Mclang}
 NO_INTEGR_AS=  -no-integrated-as
@@ -48,8 +48,8 @@ CWARNFLAGS+=  -Wno-address-of-packed-member -Wno-constant-conversion
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE ${CMACHFLAGS}
 LINKFLAGS=     -N -Ttext 100114 -e start --warn-common -nopie
 
index d68e0ff..4545885 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.octeon,v 1.56 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.octeon,v 1.57 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -42,7 +42,7 @@ CMACHFLAGS+=  -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 .if ${COMPILER_VERSION:Mclang}
 NO_INTEGR_AS=  -no-integrated-as
@@ -51,8 +51,8 @@ CWARNFLAGS+=  -Wno-address-of-packed-member -Wno-constant-conversion
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -e start -T ld.script -Ttext=${LINK_ADDRESS} --warn-common -nopie
 
index 14018f4..d8143df 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.powerpc64,v 1.8 2020/07/20 17:57:46 deraadt Exp $
+#      $OpenBSD: Makefile.powerpc64,v 1.9 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -54,12 +54,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -T ld.script -X --warn-common -pie
 
index f9c7ef1..3d6e7c7 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.sgi,v 1.100 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.sgi,v 1.101 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -42,12 +42,12 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -e start -T ld.script -Ttext=${LINK_ADDRESS} --warn-common -nopie
 
index 320ff8a..7f2fdac 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.sparc64,v 1.102 2019/11/07 20:42:28 guenther Exp $
+#      $OpenBSD: Makefile.sparc64,v 1.103 2021/01/28 17:39:03 deraadt Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -41,7 +41,7 @@ CMACHFLAGS+=  -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 .if ${COMPILER_VERSION:Mclang}
 CWARNFLAGS+=   -Wno-unused-command-line-argument
@@ -49,8 +49,8 @@ CWARNFLAGS+=  -Wno-address-of-packed-member -Wno-constant-conversion
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
 LINKFLAGS=     -n -T ld.script --warn-common -nopie