Re: gcc: why optimize for size flag is not the default

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gcc: why optimize for size flag is not the default
Date: 2009-03-11 12:42:41
Message-ID: 26016.1236775361@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Nikhil Sontakke wrote:
>> I was wondering why -Os is not used in place of -O2 while compiling the
>> Postgres sources with gcc.

> There's no free lunch.

In any case, this sort of choice is generally something that ought to be
applied at a distro level. If, say, Fedora or Debian chose to use -Os
uniformly across all their packages, then there might be a meaningful
amount of space saved in the aggregate. As far as I know, though, -Os
is not the preferred choice in any distro, which ought to tell you
something ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-03-11 12:56:11 Re: idea, proposal: only preloadable libraries (conditional load)
Previous Message Tom Lane 2009-03-11 12:38:24 Re: Has anybody think about changing BLCKSZ to an option of initdb?