From: deraadt Date: Thu, 28 Jan 2021 17:39:01 +0000 (+0000) Subject: Again allow COPTS= to come from the environment again, and don't lose the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cae8b9cb0a13da6ca7aedfa2962b63c5aa8494c1;p=openbsd Again allow COPTS= to come from the environment again, and don't lose the SMALL_KERNEL specific variations. ok espie jsg --- diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha index 07e6f1781d1..4610e49d846 100644 --- a/sys/arch/alpha/conf/Makefile.alpha +++ b/sys/arch/alpha/conf/Makefile.alpha @@ -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 diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index e6f09734584..e6c6d910b19 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -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 diff --git a/sys/arch/arm64/conf/Makefile.arm64 b/sys/arch/arm64/conf/Makefile.arm64 index f35a39e412d..6dc9e4099d9 100644 --- a/sys/arch/arm64/conf/Makefile.arm64 +++ b/sys/arch/arm64/conf/Makefile.arm64 @@ -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 diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index 6d2f7b12fc6..79f89e18f9c 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -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 diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa index 23f0d7a5090..44bc65b65b0 100644 --- a/sys/arch/hppa/conf/Makefile.hppa +++ b/sys/arch/hppa/conf/Makefile.hppa @@ -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 diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 00e00a348af..d8ab48f8660 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -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 diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk index 24027809b25..0a975c26185 100644 --- a/sys/arch/landisk/conf/Makefile.landisk +++ b/sys/arch/landisk/conf/Makefile.landisk @@ -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 diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index 6cf4a117bd1..ef0c4a60268 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -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 diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k index 57ef138e24c..d32a29c2f28 100644 --- a/sys/arch/luna88k/conf/Makefile.luna88k +++ b/sys/arch/luna88k/conf/Makefile.luna88k @@ -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 diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc index f994ef6518c..9db16c54b2a 100644 --- a/sys/arch/macppc/conf/Makefile.macppc +++ b/sys/arch/macppc/conf/Makefile.macppc @@ -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 diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index d68e0ff3a5a..45458858677 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -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 diff --git a/sys/arch/powerpc64/conf/Makefile.powerpc64 b/sys/arch/powerpc64/conf/Makefile.powerpc64 index 14018f42eb4..d8143dff423 100644 --- a/sys/arch/powerpc64/conf/Makefile.powerpc64 +++ b/sys/arch/powerpc64/conf/Makefile.powerpc64 @@ -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 diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index f9c7ef1cc6f..3d6e7c70a5f 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -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 diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 320ff8ac53d..7f2fdaca0c1 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -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