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
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



Reply via email to