automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -pipe passed to gcc via Automake


From: Ralf Corsepius
Subject: Re: -pipe passed to gcc via Automake
Date: Mon, 22 Oct 2007 06:14:33 +0200

On Sun, 2007-10-21 at 16:24 -0500, Bob Friesenhahn wrote:
> On Sun, 21 Oct 2007, Benoit SIGOURE wrote:
> 
> > On Oct 21, 2007, at 7:13 PM, NightStrike wrote:
> >
> >> If I wanted -pipe passed in to gcc all the time, do I put that in
> >> AM_CPPFLAGS or AM_CFLAGS?
> >
> > I usually do this in my configure.ac:
> >
> > AC_PROG_CXX
> > # Speed GCC compilation up.
> > if test "$GXX" = yes; then
> >  CXXFLAGS="$CXXFLAGS -pipe"
> > fi
> 
> Sounds great, but I have yet to see -pipe actually speed up 
> compilation. 
I performed some measurements several years ago - It really does speed
up compilation.

But ... IMO, such tricks should be left to the user and do not belong
into configure.ac

Also, you really want to append it to CC and not to CPPFLAGS, because
--pipe is not a cpp option.

> Sometimes pipes may not be supported.  In that case hopefully GCC 
> simply ignores the request rather than refusing to run.
... very old GCCs (<< 3.x) don't support it.

Ralf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]