From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, Jeff <threshar(at)torgo(dot)978(dot)org>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Sun performance - Major discovery! |
Date: | 2003-10-13 22:25:04 |
Message-ID: | 1253.1066083904@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-10-13 22:36:40 | Re: postgres --help-config |
Previous Message | Tom Lane | 2003-10-13 21:44:22 | Re: IDE Drives and fsync |
From | Date | Subject | |
---|---|---|---|
Next Message | Seth Ladd | 2003-10-13 23:48:15 | ways to force index use? |
Previous Message | Josh Berkus | 2003-10-13 21:32:17 | Re: Any issues with my tuning... |