From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.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 18:25:04 -0400
Message-ID: <1253.1066083904@sss.pgh.pa.us> (raw)
In-Reply-To: <200310090319.h993JpM10523@candle.pha.pa.us>
References: <200310090319.h993JpM10523@candle.pha.pa.us>
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
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, neilc@samurai.com, threshar@torgo.978.org, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Sun performance - Major discovery!
In-Reply-To: <1253.1066083904@sss.pgh.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