PERFORCE change 106136 for review

Warner Losh imp at FreeBSD.org
Fri Sep 15 00:11:52 PDT 2006


http://perforce.freebsd.org/chv.cgi?CH=106136

Change 106136 by imp at 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"


More information about the p4-projects mailing list