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: Bob Friesenhahn
Subject: Re: -pipe passed to gcc via Automake
Date: Sun, 21 Oct 2007 16:24:56 -0500 (CDT)

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. It would only really help if the temporary file directory was remarkably slow or perhaps somehow the user is not allowed to write temporary files. It is true that GCC's temporary files may be large, but it is also true that pipes only offer limited buffering and two programs must execute at once (requiring context switching) rather than just one at a time.

Sometimes pipes may not be supported. In that case hopefully GCC simply ignores the request rather than refusing to run.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

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