[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-dev
Subject:    [elinks-dev] Re: elinks - zas: Some cflags were added,
From:       Petr Baudis <pasky () ucw ! cz>
Date:       2003-10-20 12:20:29
Message-ID: 20031020122029.GA1075 () pasky ! ji ! cz
[Download RAW message or body]

Dear diary, on Mon, Oct 20, 2003 at 10:49:33AM CEST, I got a letter,
where cvs@pasky.ji.cz told me, that...
> This is an automated notification of a change to the ELinks CVS tree.
> 
> Author: zas
> Module: elinks
> Tag: <TRUNK>
> Date: Mon Oct 20 08:49:33 2003 GMT
> 
> ---- Log message:
> 
> Some cflags were added, and a note about smaller results with gcc-3.2.x than with \
> gcc-2.95.x. 
> 
> ---- Files affected:
> 
> elinks/doc:
> small.txt (1.3 -> 1.4) 
> http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/doc/small.txt.diff?r1=1.3&r2=1.4&f=u
> 
> 
> ---- Diffs:
> 
> Index: elinks/doc/small.txt
> diff -u elinks/doc/small.txt:1.3 elinks/doc/small.txt:1.4
> --- elinks/doc/small.txt:1.3	Mon Oct 20 00:29:36 2003
> +++ elinks/doc/small.txt	Mon Oct 20 10:49:27 2003
> @@ -4,7 +4,8 @@
> export CC='diet gcc'
> 
> Use compilers flags to optimize for size:
> -export CFLAGS='-Os -s -fno-inline'
> +export CFLAGS='-Os -s -fno-inline -nostdinc -march=i386 -fomit-frame-pointer \
> +               -malign-functions=1 -malign-jumps=1 -malign-loops=1 \
> -mpreferred-stack-boundary=2' 
> Disable some compile-time options:
> ./configure --disable-ipv6 --disable-backtrace --disable-nls --enable-fastmem \
> @@ -28,12 +29,15 @@
> --without-openssl	removes libssl dependency (ssl support)
> --without-x 		removes libx11 dependency (setting terminal title)
> 
> -With these, using gcc 3.2, dietlibc 0.23 and elinks 0.5pre7 from cvs,
> +With these, using gcc 3.2, CFLAGS='-Os -s -fno-inline', dietlibc 0.23 and elinks \
> 0.5pre7 from cvs, I obtain a small static binary with the following features:
> Standard, Fastmem, No Backtrace, Bookmarks, Cookies, Global History, Mailcap, \
> Mimetypes files, Forms memory 
> and a size of:
> -rwxr-xr-x    1 zas      zas        453412 2003-10-19 12:50 src/elinks
> +
> +It seems gcc 2.95.x do not generate as small binaries than gcc 3.2.x with
> +same flags.
> 
> Not so bad :)
> 

BTW, what do you get if you compile with -O2 instead of -Os ? A lot of
people say that generated binaries are in fact smaller w/ -O2. Oh, and
BTW, gcc-2.95 does not know -Os so it's no wonder... :-)

-- 
 
				Petr "Pasky" Baudis
.
To get something done, a committee should consist of no more than three
persons, two of them absent.
.
Stuff: http://pasky.ji.cz/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic