Thread: pgsql-server/ /configure /configure.in onfig/c ...
pgsql-server/ /configure /configure.in onfig/c ...
From
petere@svr1.postgresql.org (Peter Eisentraut - PostgreSQL)
Date:
CVSROOT: /cvsroot Module name: pgsql-server Changes by: petere@svr1.postgresql.org 03/10/25 12:32:11 Modified files: . : configure configure.in config : c-compiler.m4 src/template : aix bsdi freebsd hpux osf qnx4 solaris univel unixware Log message: Fix CFLAGS selection to actually work. Add test to detect whether gcc's option -fno-strict-aliasing is available.
petere@svr1.postgresql.org (Peter Eisentraut - PostgreSQL) writes: > Log message: > Fix CFLAGS selection to actually work. Add test to detect whether gcc's > option -fno-strict-aliasing is available. A couple comments on this patch ... The immediately previous code would default to CFLAGS="-g" if --enable-debug is specified and the compiler is not gcc. As it now stands, we default to CFLAGS="-O -g" instead. I'm not convinced this is a good idea. On most non-gcc compilers, this combination gets you "-g" and possibly a ton of warnings. I think you changed the behavior for the AIX port. Diffing src/template/aix against the old contents: diff -c -r1.11 -r1.14 *** pgsql-server/src/template/aix 2002/09/04 22:54:18 1.11 --- pgsql-server/src/template/aix 2003/10/25 15:32:11 1.14 *************** *** 1,9 **** ! if test "$GCC" = yes ; then ! CFLAGS='-O2 -pipe' ! else # not GCC ! CFLAGS='-O2 -qmaxmem=16384 -qsrcmsg -qlonglong' case $host_os in ! aix3.2.5 | aix4.1*) ! CFLAGS='-qmaxmem=16384 -qsrcmsg' ;; esac ! fi # not GCC --- 1,7 ---- ! if test "$GCC" != yes ; then case $host_os in ! aix3.2.5 | aix4.1*) ;; ! *) CFLAGS="-O2 -qlonglong";; esac ! CFLAGS="-O -qmaxmem=16384 -qsrcmsg" ! fi The "case" is now useless because CFLAGS will always end up with the later setting. Don't we want something like if test "$GCC" != yes ; then case $host_os in aix3.2.5 | aix4.1*) CFLAGS='-qmaxmem=16384 -qsrcmsg' ;; *) CFLAGS='-O2 -qmaxmem=16384 -qsrcmsg -qlonglong' ;; esac fi regards, tom lane
Tom Lane writes: > The immediately previous code would default to CFLAGS="-g" if > --enable-debug is specified and the compiler is not gcc. As it > now stands, we default to CFLAGS="-O -g" instead. I'm not convinced > this is a good idea. On most non-gcc compilers, this combination > gets you "-g" and possibly a ton of warnings. Good point. Back to the drawing board. > I think you changed the behavior for the AIX port. Diffing > src/template/aix against the old contents: > > diff -c -r1.11 -r1.14 1.11 is not the old content. But the current state is still broken as you say. -- Peter Eisentraut peter_e@gmx.net