diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2017-07-25 13:32:15 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2017-07-25 13:32:15 +0000 |
commit | 8649e94e762e89c9b935d8d42b2371ebb2012bdf (patch) | |
tree | 60c6ab496824183563ac495e3107423340fcd95b | |
parent | 5a56edb633ad3fcab435ac1c5889398ccefeb9ff (diff) |
change -Os to -Oz all around the tree
clang optimizes better for size with -Oz so use that as a default to avoid
overflowing the ramdisk floppies. gcc now accepts -Oz as an alias for -Os.
ok kettenis@
-rw-r--r-- | distrib/alpha/bsd.rd/Makefile | 4 | ||||
-rw-r--r-- | distrib/alpha/common/Makefile.inc | 4 | ||||
-rw-r--r-- | distrib/amd64/ramdiskA/Makefile.inc | 4 | ||||
-rw-r--r-- | distrib/amd64/ramdisk_cd/Makefile.inc | 4 | ||||
-rw-r--r-- | distrib/i386/common/Makefile.inc | 4 | ||||
-rw-r--r-- | distrib/ramdisk/Makefile | 4 | ||||
-rw-r--r-- | distrib/socppc/ramdisk/Makefile | 4 | ||||
-rw-r--r-- | distrib/sparc64/bsd.rd/Makefile | 4 | ||||
-rw-r--r-- | distrib/sparc64/ramdisk/Makefile | 4 | ||||
-rw-r--r-- | distrib/sparc64/ramdiskB/Makefile | 4 | ||||
-rw-r--r-- | distrib/special/Makefile.inc | 2 | ||||
-rw-r--r-- | share/mk/bsd.lib.mk | 4 | ||||
-rw-r--r-- | sys/arch/alpha/stand/boot/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/amd64/stand/Makefile.inc | 4 | ||||
-rw-r--r-- | sys/arch/hppa/stand/Makefile.inc | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/Makefile.inc | 4 | ||||
-rw-r--r-- | sys/arch/landisk/stand/Makefile.inc | 4 |
17 files changed, 33 insertions, 33 deletions
diff --git a/distrib/alpha/bsd.rd/Makefile b/distrib/alpha/bsd.rd/Makefile index 241185ba092..23ebb201b6d 100644 --- a/distrib/alpha/bsd.rd/Makefile +++ b/distrib/alpha/bsd.rd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.24 2017/06/03 22:25:19 deraadt Exp $ +# $OpenBSD: Makefile,v 1.25 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -31,7 +31,7 @@ bsd.rd_unz: bsd ${IMAGE} rdsetroot bsd: cd ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${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 2433e4fb146..f92e3250cbc 100644 --- a/distrib/alpha/common/Makefile.inc +++ b/distrib/alpha/common/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.29 2017/01/27 17:59:09 natano Exp $ +# $OpenBSD: Makefile.inc,v 1.30 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -73,7 +73,7 @@ bsd.rd: bsd ${IMAGE} rdsetroot bsd: cd ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${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 e447e86b412..c51ae0b0517 100644 --- a/distrib/amd64/ramdiskA/Makefile.inc +++ b/distrib/amd64/ramdiskA/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.4 2017/06/03 22:25:19 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -75,7 +75,7 @@ bsd.rd: mr.fs bsd rdsetroot bsd: cd ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${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 941716fac3b..9ecce864e28 100644 --- a/distrib/amd64/ramdisk_cd/Makefile.inc +++ b/distrib/amd64/ramdisk_cd/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.5 2017/06/03 22:25:19 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.6 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -78,7 +78,7 @@ bsd.rd: mr.fs bsd rdsetroot bsd: cd ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${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 70e883ff17c..77686d17c87 100644 --- a/distrib/i386/common/Makefile.inc +++ b/distrib/i386/common/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.42 2017/06/03 22:25:19 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.43 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -57,7 +57,7 @@ unconfig: DISKTYPE?= rdroot MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 -COPTS= -Os -mtune=i486 +COPTS= -Oz -mtune=i486 bsd.gz: bsd.rd cp bsd.rd bsd.strip diff --git a/distrib/ramdisk/Makefile b/distrib/ramdisk/Makefile index ba7ae4adb12..58267acdc5b 100644 --- a/distrib/ramdisk/Makefile +++ b/distrib/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.48 2017/06/03 22:25:19 deraadt Exp $ +# $OpenBSD: Makefile,v 1.49 2017/07/25 13:32:14 robert Exp $ REV= ${OSrev} @@ -74,7 +74,7 @@ ${FLOPPY}: bsd.gz ${BOOT} ${BOOTXX} bsd: cd ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${KERNEL} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' cp -p ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${KERNEL}/obj/bsd bsd bsd.rd: bsd ${IMAGE} rdsetroot diff --git a/distrib/socppc/ramdisk/Makefile b/distrib/socppc/ramdisk/Makefile index fcf8823c924..b4e9bb3ed71 100644 --- a/distrib/socppc/ramdisk/Makefile +++ b/distrib/socppc/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2016/12/22 10:26:47 natano Exp $ +# $OpenBSD: Makefile,v 1.17 2017/07/25 13:32:14 robert 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=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' cp -p ${TOP}/../../sys/arch/socppc/compile/RAMDISK/obj/bsd bsd rdsetroot: ${TOP}/../common/elfrdsetroot.c diff --git a/distrib/sparc64/bsd.rd/Makefile b/distrib/sparc64/bsd.rd/Makefile index 87e06d11406..b1d572e9a6f 100644 --- a/distrib/sparc64/bsd.rd/Makefile +++ b/distrib/sparc64/bsd.rd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2017/06/03 22:25:19 deraadt Exp $ +# $OpenBSD: Makefile,v 1.32 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -31,7 +31,7 @@ bsd.rd_unz: bsd ${IMAGE} rdsetroot bsd: cd ${.CURDIR}/../../../sys/arch/sparc64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${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 4e06bc50036..9fae7b5d9af 100644 --- a/distrib/sparc64/ramdisk/Makefile +++ b/distrib/sparc64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.32 2017/01/27 17:59:09 natano Exp $ +# $OpenBSD: Makefile,v 1.33 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -78,7 +78,7 @@ ${IMAGE}: ${CBIN} bsd: cd ${TOP}/../../sys/arch/sparc64/compile/${KERNEL} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' cp -p ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/obj/bsd bsd elfrdsetroot: ${TOP}/../common/elfrdsetroot.c diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile index 4dbf05cc6b7..6c099b1c313 100644 --- a/distrib/sparc64/ramdiskB/Makefile +++ b/distrib/sparc64/ramdiskB/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.26 2017/01/27 17:59:09 natano Exp $ +# $OpenBSD: Makefile,v 1.27 2017/07/25 13:32:14 robert Exp $ TOP= ${.CURDIR}/.. @@ -78,7 +78,7 @@ ${IMAGE}: ${CBIN} bsd: cd ${TOP}/../../sys/arch/sparc64/compile/${KERNEL} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Oz ${MAKE}' cp -p ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/obj/bsd bsd elfrdsetroot: ${TOP}/../common/elfrdsetroot.c diff --git a/distrib/special/Makefile.inc b/distrib/special/Makefile.inc index 8a8fb56df3c..c6454a08a0b 100644 --- a/distrib/special/Makefile.inc +++ b/distrib/special/Makefile.inc @@ -1,6 +1,6 @@ # options for all the directories below -COPTS+=-Os -fno-stack-protector +COPTS+=-Oz -fno-stack-protector MAN= LDSTATIC=-static NOPIE= diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 88db7239091..c5b4e1eea70 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.88 2017/07/11 18:16:48 robert Exp $ +# $OpenBSD: bsd.lib.mk,v 1.89 2017/07/25 13:32:14 robert Exp $ # $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $ # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 @@ -34,7 +34,7 @@ CXXFLAGS+= ${NOPIE_FLAGS} AFLAGS+= ${NOPIE_FLAGS} .endif -DIST_CFLAGS+= -Os +DIST_CFLAGS+= -Oz .c.o: @echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}" diff --git a/sys/arch/alpha/stand/boot/Makefile b/sys/arch/alpha/stand/boot/Makefile index b98e666b6e9..3f61ed44139 100644 --- a/sys/arch/alpha/stand/boot/Makefile +++ b/sys/arch/alpha/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2017/06/12 18:49:34 espie Exp $ +# $OpenBSD: Makefile,v 1.23 2017/07/25 13:32:14 robert Exp $ # $NetBSD: Makefile,v 1.17 1997/04/17 07:27:46 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -28,7 +28,7 @@ DEFNS= -DCOMPAT_UFS AFLAGS += -DASSEMBLER ${DEFNS} -fno-pie CPPFLAGS += -I${.CURDIR}/../../../../lib/libsa -I${.CURDIR}/../.. -I${S} ${DEFNS} -CFLAGS = -Os -Werror -mno-fp-regs -fno-pie \ +CFLAGS = -Oz -Werror -mno-fp-regs -fno-pie \ -msmall-data -msmall-text ${PROG}.nosym: ${PROG}.sym diff --git a/sys/arch/amd64/stand/Makefile.inc b/sys/arch/amd64/stand/Makefile.inc index 1418ea740c7..7e45fedcc49 100644 --- a/sys/arch/amd64/stand/Makefile.inc +++ b/sys/arch/amd64/stand/Makefile.inc @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile.inc,v 1.17 2017/05/30 22:32:10 naddy Exp $ +# $OpenBSD: Makefile.inc,v 1.18 2017/07/25 13:32:14 robert Exp $ -CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror +CFLAGS=${DEBUG} ${COPTS} -Oz -Wall -Werror CFLAGS+= -ffreestanding -fno-stack-protector -DMDRANDOM CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR} SACFLAGS=-D_STANDALONE diff --git a/sys/arch/hppa/stand/Makefile.inc b/sys/arch/hppa/stand/Makefile.inc index 355d16a91c0..2f9798bfd18 100644 --- a/sys/arch/hppa/stand/Makefile.inc +++ b/sys/arch/hppa/stand/Makefile.inc @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile.inc,v 1.21 2016/11/06 16:04:20 tb Exp $ +# $OpenBSD: Makefile.inc,v 1.22 2017/07/25 13:32:14 robert Exp $ -CFLAGS=${DEBUG} -Os -Wall -Werror +CFLAGS=${DEBUG} -Oz -Wall -Werror CPPFLAGS+=-I${S} -I. -I${.CURDIR} SACFLAGS=-nostdinc -fno-builtin -D_STANDALONE -I${STANDIR}/libsa SACFLAGS+=-mdisable-fpregs -mfast-indirect-calls -mpa-risc-1-1 diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc index db0c743e548..cd14f5b8954 100644 --- a/sys/arch/i386/stand/Makefile.inc +++ b/sys/arch/i386/stand/Makefile.inc @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile.inc,v 1.50 2017/06/01 11:18:53 naddy Exp $ +# $OpenBSD: Makefile.inc,v 1.51 2017/07/25 13:32:14 robert Exp $ -CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror +CFLAGS=${DEBUG} ${COPTS} -Oz -Wall -Werror CFLAGS+= -ffreestanding -fno-stack-protector -DMDRANDOM CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR} SACFLAGS=-D_STANDALONE diff --git a/sys/arch/landisk/stand/Makefile.inc b/sys/arch/landisk/stand/Makefile.inc index 47e34021e56..542df2ec7ef 100644 --- a/sys/arch/landisk/stand/Makefile.inc +++ b/sys/arch/landisk/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.3 2016/11/06 16:04:20 tb Exp $ +# $OpenBSD: Makefile.inc,v 1.4 2017/07/25 13:32:14 robert Exp $ .if !make(clean) && !make(cleandir) && !make(includes) && !make(libdep) && \ !make(sadep) && !make(salibdir) && !make(obj) @@ -7,7 +7,7 @@ @([ X$(S) = X -o -h sh ] || ln -s $(S)/arch/sh/include sh) .endif -CFLAGS+=-Os -fno-stack-protector -fno-builtin +CFLAGS+=-Oz -fno-stack-protector -fno-builtin CLEANFILES+= machine sh BINDIR= /usr/mdec MANSUBDIR=landisk |