You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Michael Barnes <mb...@compsci.wm.edu> on 2004/11/01 20:20:35 UTC

Re: CFLAGS

On Mon, Nov 01, 2004 at 12:24:27PM -0500, David Brodbeck wrote:
> On Wed, 22 Sep 2004 09:15:48 -0700, Justin Mason wrote
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > David Brodbeck writes:
> > > Is there a way to get the SpamAssassin build process to use
> > > -O instead of -O2 while building spamc?  I run FreeBSD on a
> > > DEC Alpha, and -O2 triggers optimizer bugs in gcc on that
> > > architecture.  I've just been editing the configure script before
> > > building, but it'd be nice if there was an easier way.
> > 
> > yep:
> > 
> >     perl Makefile.PL CCFLAGS="-O"
> 
> Hmm...just tried that with SpamAssassin 3.0.1 and it *still* built
> spamc with -O2.  I had to edit spamc/configure again to force it to
> use -O.

I was able to change the default CFLAGS by putting the CCFLAGS and the
CFLAGS values in my environment before running "perl Makefile.PL".

I would guess that this could be considered a bug, because its not too
uncommon for default CFLAGS to be changed during a compilation.

Mike

-- 
/-----------------------------------------\
| Michael Barnes <mb...@compsci.wm.edu> |
| UNIX Systems Administrator              |
| College of William and Mary             |
| Phone: (757) 879-3930                   |
\-----------------------------------------/

Re: CFLAGS

Posted by David Brodbeck <gu...@gull.us>.
On Mon, 01 Nov 2004 11:54:50 -0800, Justin Mason wrote
> BTW the default CFLAGS are coming from whatever perl was built with;
> so I'd be worried about bugs in your perl accordingly ;)

That's not where spamc is getting them.  They're hard-coded in the configure 
script:

ringbill# grep 'O2' -B1 spamc/configure
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
--
  if test "$GCC" = yes; then
    CFLAGS="-O2"


Re: CFLAGS

Posted by David Brodbeck <gu...@gull.us>.
On Mon, 1 Nov 2004 14:20:35 -0500, Michael Barnes wrote
> I was able to change the default CFLAGS by putting the CCFLAGS and 
> the CFLAGS values in my environment before running "perl Makefile.PL".
> 
> I would guess that this could be considered a bug, because its not 
> too uncommon for default CFLAGS to be changed during a compilation.

You were right.  It has to go in the environment.

In other words, this doesn't work:

# perl Makefile.PL CCFLAGS="-O"
# make

But this does:

# perl Makefile.PL
# CFLAGS="-O" make