On Tue, 2011-03-15 at 22:02 -0400, Andrew Henderson wrote:
>
> While most people don't do this, you can set your CFLAGS/CPPFLAGS 
> environment variables in your shell. 

Gentoo does that in /etc/make.conf :)

Though some packages have hard coded flags which you must remove to
override. Thankfully not many, but does happen.

> Autoconf configure scripts will pick 
> up on this and add additional flags to the base flags for your 
> environment.  I have yet to see any software package use the "-j" flag, so 
> that's a safe one to override.  Since "-j1" is the default, you might 
> suddenly find all of your new compiles after you run the configure script 
> again to be much snappier if you increase it.

Typically on Gentoo where you see -j1 is when a package is known to fail
with more than one process/parallel compile. Granted a Gentoo ebuild
could only set -j1 if its set to something higher than that in
make.conf, which by default is should.

Most any Gentoo documentation suggests you to set -j1, to the number of
cpu/cores plus one. Thus even a single core system will be set to -j2,
and that could make some things fail to compile. If their build system
has not be tested out and/or supports parallel compiling.

> The "-j" flag specifies the number of simultaneous build processes that 
> are running, and multi-core CPUs will take advantage of this.  So, 
> sometimes when you think that you are using distcc, you might actually 
> still be using just the cores of the local CPU if the number after the 
> "-j" is too small.  distcc really shines when you are doing 
> computationally expensive compiles (high-optimization, Boost templates, 
> etc.).

The inverse of that is if you set the -j to high, even if your not
compiling on the local box. The local box might get overloaded trying to
manage all the remote compiles. Its some what of a balancing act :)

But on Gentoo quite a number of packages will use distcc/parallel
compiles, but not all. Using distcc on Gentoo will help to speed things
up, but the increase in performance is not always what one expects.

-- 
William L. Thomson Jr.
Obsidian-Studios, Inc.
http://www.obsidian-studios.com


---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/[email protected]/maillist.xml
Unsubscribe  [email protected]

Reply via email to