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: Benoit SIGOURE
Subject: Re: -pipe passed to gcc via Automake
Date: Sun, 21 Oct 2007 23:43:55 +0200

On Oct 21, 2007, at 11:24 PM, 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. 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.

Hmm indeed, I tested a `make clean all' (with ccache disabled and all) on a project with ~18k lines of code (sloccount) and the build without `-pipe' was 6s "faster". So yeah, I doubt that -pipe speeds anything up.

Thanks!

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

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