From owner-p4-projects@FreeBSD.ORG Fri Sep 15 07:11:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0509116A415; Fri, 15 Sep 2006 07:11:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3FAF16A412 for ; Fri, 15 Sep 2006 07:11:51 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7498743D6E for ; Fri, 15 Sep 2006 07:11:51 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8F7BpxR041802 for ; Fri, 15 Sep 2006 07:11:51 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8F7BpsW041799 for perforce@freebsd.org; Fri, 15 Sep 2006 07:11:51 GMT (envelope-from imp@freebsd.org) Date: Fri, 15 Sep 2006 07:11:51 GMT Message-Id: <200609150711.k8F7BpsW041799@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 106136 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 07:11:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=106136 Change 106136 by imp@imp_lighthouse on 2006/09/15 07:11:01 Compile -Os. I'm not 100% sure I like this change. It causes the compiler to emit code that calls huge-ass division routines so typically increases the size of the boot image by a few tens to a few hundred bytes. Since all the other loaders are no where near their limits, this is OK, but a little worrisome. However, for the most important boot loader (boot2), it shrinks it by 356 bytes. A rather substantial savings, so go ahead and pull the trigger. I'm sure careful study of boot2 will shed light on why the other loaders grew so much if anyone ever wishes to investigate. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#20 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#20 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#20 (text+ko) ==== @@ -5,7 +5,7 @@ __at91_boot_Makefile.inc__: -CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ +CFLAGS=-Os -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ -I${.CURDIR}/../../../.. \ -I${.CURDIR}/../../../../arm \ ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#6 (text+ko) ==== @@ -2,11 +2,9 @@ .PATH: ${.CURDIR}/../bootspi -BOOT_COMCONSOLE_SPEED?= 9600 - P=boot2 FILES=${P} -SRCS=arm_init.S boot2.c ee.c ashldi3.c divsi3.S +SRCS=arm_init.S boot2.c ee.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#20 (text+ko) ==== @@ -7,6 +7,7 @@ SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c fpga.c getc.c \ p_string.c putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c mci_device.c strcvt.c +SRCS+=ashldi3.c divsi3.S NO_MAN= .if ${MK_TAG_LIST} != "no"