Problems Building 7.0-Beta3 with -Os
Alexander Leidinger
Alexander at Leidinger.net
Fri Dec 7 01:50:07 PST 2007
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 @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
More information about the freebsd-current
mailing list