pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: Jeff <threshar@torgo.978.org>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Sun performance - Major discovery!
Date: Mon, 13 Oct 2003 20:48:13 -0400 (EDT)
Message-ID: <200310140048.h9E0mDe09671@candle.pha.pa.us> (raw)
In-Reply-To: <1253.1066083904@sss.pgh.pa.us>


Done as you suggested.

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > OK, patch attached and applied.  It centralizes the optimization
> > defaults into configure.in, rather than having CFLAGS= in the template
> > files.
> 
> I think there's a problem here:
> 
> > + # configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
> > + if test x"$CFLAGS" = x""; then
> > + 	CFLAGS="-O"
> > + fi
> >   if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
> >     CFLAGS="$CFLAGS -g"
> >   fi
> 
> since this will cause "configure --enable-debug" to default to selecting
> CFLAGS="-O -g" for non-gcc compilers.  On a lot of compilers that
> combination does not work, and will generate tons of useless warnings.
> I think it might be better to do
> 
>   if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
>     CFLAGS="$CFLAGS -g"
> + else
> +   # configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
> +   if test x"$CFLAGS" = x""; then
> + 	CFLAGS="-O"
> +   fi
>   fi
> 
> 			regards, tom lane
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (48+ messages)  latest in thread

Message-ID: <200310140048.h9E0mDe09671@candle.pha.pa.us>
Permalink:  ../200310140048.h9E0mDe09671@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200310140048.h9E0mDe09671@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, neilc@samurai.com, threshar@torgo.978.org, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Sun performance - Major discovery!
  In-Reply-To: <200310140048.h9E0mDe09671@candle.pha.pa.us>
  References: <1253.1066083904@sss.pgh.pa.us> <200310140048.h9E0mDe09671@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox