2008/1/17, Hendrik Sattler <[EMAIL PROTECTED]>:
> Am Mittwoch 16 Januar 2008 schrieb Rodolfo Lima:
> > Well, if the above setup is made, one might call:
> > CC="i686-pc-linux-gnu-gcc" cmake . and it'll work, but this is
> > suboptimal IMHO. I can't see any other bad side effect of using the
> > complete compiler name instead of the short one.

Ok now I think I understand the way distcc works.

> gcc _is_ the complete compiler name. On Debian GNU/Linux, you have
> i486-linux-gnu-gcc as a symlink to a versioned gcc binary (gcc-4.2).
> Nothing enforces this GNU naming scheme.

I think that when you build a gcc cross compiler you end up
with the "i486-linux-gnu-gcc" kind of naming scheme I don't
know if it's standard or not but...

For Rodolfo:
When you setup your distcc farm you should either install
your cross-compiler with a consistent naming scheme for gcc
or symlink the native compiler with the appropriate pseudo
cross-compiler name.

After that invoking CMake on the master box with
the following command line:

CC="distcc i686-pc-linux-gnu-gcc" cmake .
and then
make -jX

should be OK.

NOTE that I DID NOT invoke:
CC="i686-pc-linux-gnu-gcc" cmake .

as you suggested.
I did put 'distcc' as a PREFIX in CC var, since CMake should handle
this just fine unless there is an unfixed regression in CMake CVS
(see http://www.cmake.org/pipermail/cmake/2007-November/017458.html).

So when you previously said:
> The problem is that normally cmake chooses /usr/bin/gcc as the compiler.

this is not quite true (I think) if you tell CMake using CC envar like:
CC="i686-pc-linux-gnu-gcc" cmake .

even more CMake should handle the distcc/ccache prefix
perfectly well in CC. so you don't need:

> One solution would be if cmake picked the complete name of the local
> machine compiler, i.e. i686-pc-linux-gnu-gcc, instead of simply gcc.
> This way distcc would know which compiler to use.

You just have to tell CMake HOW it should use distcc:
CC="distcc i686-pc-linux-gnu-gcc" cmake .

Does it works for you?
Is there something wrong I did not catch with my suggestion
besides the fact that CMake does not "build" the mangled
gcc name for you?
(which may be impossible if there no standard naming scheme
 as Hendrik suggested).


-- 
Erk
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to