Re: libpq++ build problems - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: libpq++ build problems
Date
Msg-id Pine.LNX.4.44.0207062351010.929-100000@localhost.localdomain
Whole thread Raw
In response to Re: libpq++ build problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: libpq++ build problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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   peter_e@gmx.net





pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Proposal: CREATE CONVERSION
Next
From: Peter Eisentraut
Date:
Subject: Re: libpq++ build problems