bug#311: Interesting results

Seth David Schoen <[email protected]>
Newsgroups gmane.linux.bbc.bugs
Message-ID <[email protected]>
Seth David Schoen writes:

> I ran a build of fs/e2fsprogs with the normal gar.conf.mk, and then I
> ran it again with a modified gar.conf.mk in which CFLAGS had "-Os" at
> the end.
> 
> What I found was that some binaries came out smaller, and other
> binaries came out larger!
> 
> e2fsprogs has a default of -O2, and so the -Os is overriding that.
> That implies that -O2 sometimes produces smaller binaries and
> sometimes produces larger binaries than -Os, even though really it
> should never produce larger binaries.  I think this is a gcc bug.
> 
> A little later, I'm going to run a full build with -Os and see what
> the net effect on the size of the image is.  Nick used to have a -Os
> in there somewhere, and I don't remember why or when he took it out.

The answer is that -- building on garson outside the chroot, using
Nate's new gar -- the images built with -Os are more than 1,200,000
bytes smaller than images built without -Os.  (OK, I also changed
hackedbox slightly in that tree in between, but I think that was almost
insignificant.)

I think Nick might have been the only person building with -Os,
because, as I mentioned, it's not documented anywhere.

We could put a -Os in gar.conf.mk (which is what I did for this
build).  The only downside is that some other gar-built distributions
might not want it.  Could we put it in meta/lnx-bbc?

Some packages still don't use CFLAGS at all.  By forcing more packages
to honor our CFLAGS, we can reduce the size of the image even further.

-- 
Seth David Schoen <[email protected]> | Reading is a right, not a feature!
     http://www.loyalty.org/~schoen/   |                 -- Kathryn Myronuk
     http://vitanuova.loyalty.org/     |
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.