Bruce Momjian writes:

> jtv wrote:
> > On Wed, Jul 03, 2002 at 01:45:56PM -0400, Bruce Momjian wrote:
> > >
> > > Actually, I am confused. In src/template/freebsd I see:
> > >
> > >   CFLAGS='-pipe'
> > >
> > >   case $host_cpu in
> > >     alpha*)   CFLAGS="$CFLAGS -O";;
> > >     i386*)    CFLAGS="$CFLAGS -O2";;
> > >   esac
> > >
> > > so why is he seeing the -O2 flag on FreeBSD/alpha?
> >
> > Probably because CXXFLAGS still has -O2 set.
>
> Interesting.  I thought -O2 was only set in /template files, but I now
> see it is set in configure too.  The following patch fixes the libpqxx
> compile problem on FreeBSD/alpha.  The old code set -O2 for
> FreeBSD/i386, but that is already set earlier.  The new patch just
> updates the FreeBSD/alpha compile.

Except that it now fails to set CFLAGS correctly.  Please avoid "expr"
too.  "case" is fine.

Actually, you can't really set CXXFLAGS in the template file, because at
that point you don't know what kind of C++ compiler is going to be used
yet.  That's why it's handled in configure later.

-- 
Peter Eisentraut   [EMAIL PROTECTED]




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply via email to