[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patches] PATCH: make building with -Os possible



Sandra Loosemore <sandra at codesourcery.com> writes:
> If you try building EGLIBC with -Os instead of -O2, it fails because
> it's missing some __extern_inline definitions in io/sys/stat.h.  The
> attached patch fixes this problem -- it's kind of ugly, but it works.
>
> Size savings when compiling with -Os versus -O2 varies by target.
> Here are the numbers I got.  The first number is the total size of the
> stripped sysroot tree in kB, the second one the size of libc.so.6.
>
> powerpc-none-linux-gnu
> -O2	40432	1388226
> -Os	36284	1225481
>         89.7%	88.3%
>
> i686-none-linux-gnu
> -O2	32236	1275856
> -Os	29152	1066487
> 	90.4%	83.6%
>
> arm-none-linux-gnueabi
> -O2     34284	1168380
> -Os	32344	1090296
> 	94.3%	93.3%
>
> mips-none-linux-gnu
> -O2	37476 	1461949
> -Os	34808	1376726
> 	92.9%	94.2%
>
> Tested without regression on powerpc-none-linux-gnu, as well as built
> on the other targets.  OK to commit?

I was expecting some other changes to be necessary; I know we came
across a problem before where a change in trunk GCC's inlining
behavior caused EGLIBC to fail to build because something was no
longer being inlined that was required to be.  But that was a static
failure, so I don't see any harm in this patch going in.  We'll shake
out whatever else shows up when it shows up.