This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC 3.0 Release Criteria


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]