Re: Problems Building 7.0-Beta3 with -Os

From: Alexander Leidinger <Alexander_at_Leidinger.net>
Date: Fri, 07 Dec 2007 10:49:56 +0100
Quoting David O'Brien <obrien_at_freebsd.org> (from Thu, 6 Dec 2007  
08:34:08 -0800):

> On Thu, Dec 06, 2007 at 08:43:42AM +0100, Alexander Leidinger wrote:
>> And after the import of the new gcc in 7, a lot of people noticed, that
>> the resulting binaries are larger with -Os than with -O2.
>
>     quynh:/usr/src/usr.bin/vi> uname -m
>     amd64
>     quynh:/usr/src/usr.bin/vi> /bin/ls -l nvi.-O*
>     -rwxr-xr-x  1 root  ncvs  366894 Dec  6 08:21 nvi.-O2
>     -rwxr-xr-x  1 root  ncvs  313043 Dec  6 08:21 nvi.-Os
>     quynh:/usr/src/usr.bin/vi> size nvi.-O*
>        text    data     bss     dec     hex filename
>      326132    1944    4392  332468   512b4 nvi.-O2
>      273759    1944    4392  280095   4461f nvi.-Os
>
> Perhaps you mean *sometimes* larger.

AFAIR it makes the kernel in /boot/ much larger.

> Also -Os goal is run-time foot print, not disk foot print.

Could you please be a little bit more verbose? If we let alone  
debugging stuff which can be stripped out: how can you get a smaller  
size at run-time compared to the size on disk? If the binary size of a  
program on disk (without debugging stuff) is much larger, how can it  
be smaller at run-time in the end?

Bye,
Alexander.

-- 
The difference between a good haircut and a bad one is seven days.

http://www.Leidinger.net    Alexander _at_ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild _at_ FreeBSD.org  : PGP ID = 72077137
Received on Fri Dec 07 2007 - 08:50:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:23 UTC