GCC 3.0 Release Criteria
Jeff Garzik
jgarzik@mandrakesoft.com
Thu Apr 27 18:39:00 GMT 2000
Jan Hubicka wrote:
> concerning the size of Linux kernel compiled by 2.7.2 compared to current CVS,
> I guess you can reduce the difference by fair amount by using
> -mpreferred-stack-boundary=2, that avoids unnecesary stack alignment
> instructions and reduces code size noticeably (I am not sure whether 10%).
>
> Perhaps someone may find time to make patch that will enable this option
> by default for gcc newer than 2.95.x. I believe latest kernels already
> have some code to choose options depending on gcc version.
2.2.x kernels need this IIRC, but 2.3.x kernels do this by default.
It is not keyed on version, but instead uses an autoconf-like feature
test in arch/i386/Makefile to determine if -mpreferred-stack-boundary is
supported:
# prevent gcc from keeping the stack 16 byte aligned
CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null
-xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2";
fi)
--
Jeff Garzik | Nothing cures insomnia like the
Building 1024 | realization that it's time to get up.
MandrakeSoft, Inc. | -- random fortune
More information about the Gcc
mailing list