From owner-svn-src-all@FreeBSD.ORG Tue Sep 13 14:03:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 474E8106564A; Tue, 13 Sep 2011 14:03:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3707E8FC08; Tue, 13 Sep 2011 14:03:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8DE3u4o083207; Tue, 13 Sep 2011 14:03:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8DE3u2t083203; Tue, 13 Sep 2011 14:03:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201109131403.p8DE3u2t083203@svn.freebsd.org> From: Andriy Gapon Date: Tue, 13 Sep 2011 14:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225530 - in head/sys/boot/i386: gptboot gptzfsboot zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 14:03:56 -0000 Author: avg Date: Tue Sep 13 14:03:55 2011 New Revision: 225530 URL: http://svn.freebsd.org/changeset/base/225530 Log: gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1 gpt and zfs boot blocks are not nearly as size-constrained as boot2 from which they inherited their current optimization and anti-optimization options. As such the current options do not provide any benefit, but make debugging of the code much harder. Also, it has been demonstrated that combination of -mrtd and -fno-unit-at-a-time may result in mis-compilation of the boot code with the current base gcc. Additionally, intermediate assembly file filtering is removed for zfsboot. The new boot blocks are all compile- and boot- tested using qemu. gptzfsboot is tested with real hardware. Reported by: Peter Jeremy [miscompilation] Discussed with: bde, jhb Tested by: Sebastian Chmielewski [gptzfsboot] Approved by: re (kib) MFC after: 3 weeks Modified: head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile Modified: head/sys/boot/i386/gptboot/Makefile ============================================================================== --- head/sys/boot/i386/gptboot/Makefile Tue Sep 13 14:01:35 2011 (r225529) +++ head/sys/boot/i386/gptboot/Makefile Tue Sep 13 14:03:55 2011 (r225530) @@ -20,12 +20,7 @@ GPTBOOT_UFS?= UFS1_AND_UFS2 #GPTBOOT_UFS?= UFS1_ONLY CFLAGS= -DBOOTPROG=\"gptboot\" \ - -Os \ - -fno-guess-branch-probability \ - -fomit-frame-pointer \ - -fno-unit-at-a-time \ - -mno-align-long-strings \ - -mrtd \ + -O1 \ -DGPT \ -D${GPTBOOT_UFS} \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ Modified: head/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile Tue Sep 13 14:01:35 2011 (r225529) +++ head/sys/boot/i386/gptzfsboot/Makefile Tue Sep 13 14:03:55 2011 (r225530) @@ -17,12 +17,7 @@ ORG1= 0x7c00 ORG2= 0x0 CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ - -Os \ - -fno-guess-branch-probability \ - -fomit-frame-pointer \ - -fno-unit-at-a-time \ - -mno-align-long-strings \ - -mrtd \ + -O1 \ -DGPT -DBOOT2 \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ -DSIOFMT=${B2SIOFMT} \ Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Tue Sep 13 14:01:35 2011 (r225529) +++ head/sys/boot/i386/zfsboot/Makefile Tue Sep 13 14:03:55 2011 (r225530) @@ -15,12 +15,7 @@ ORG1= 0x7c00 ORG2= 0x2000 CFLAGS= -DBOOTPROG=\"zfsboot\" \ - -Os \ - -fno-guess-branch-probability \ - -fomit-frame-pointer \ - -fno-unit-at-a-time \ - -mno-align-long-strings \ - -mrtd \ + -O1 \ -DBOOT2 \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ -DSIOFMT=${B2SIOFMT} \ @@ -85,20 +80,10 @@ zfsboot.bin: zfsboot.out zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} -zfsboot.o: zfsboot.s -.if ${CC:T:Mclang} == "clang" - ${CC} ${ACFLAGS} -c zfsboot.s -.endif - SRCS= zfsboot.c -zfsboot.s: zfsboot.c ${.CURDIR}/../../zfs/zfsimpl.c - ${CC} ${CFLAGS} -S -o zfsboot.s.tmp ${.CURDIR}/zfsboot.c - sed -e '/align/d' -e '/nop/d' < zfsboot.s.tmp > zfsboot.s - rm -f zfsboot.s.tmp - .if ${MACHINE_CPUARCH} == "amd64" -beforedepend zfsboot.s: machine +beforedepend zfsboot.o: machine CLEANFILES+= machine machine: ln -sf ${.CURDIR}/../../../i386/include machine