to use a cross compiler on distcc servers, it is necessary to fully qualify the compiler name (ie. powerpc-unknown-linux-gcc rather than cc). The Makefile for xfree-4.3.0-r1 uses cc, so the compile fails.
And I assume you tested this withouth distcc/cross compile as well ?
well, tom?
Yes, sorry, compiles fine without using distcc. Same problem as a host of other ebuilds Martin was looking at for me. I changed my mind about upgrading from 4.2.0 until the DRI mach64 patches are quite ready... Anyway, to rephrase this as Martin prefers: ACCEPT_KEYWORDS="~ppc" CC=powerpc-unknown-linux-gnu-gcc emerge =xfree-4.3.0-r1 ignores CC, and uses gcc instead. (This goes for most of the other xfree ebuilds btw...) I'm not sure where the root of this is coming from, but at least it seems to manifest itself in the allegedly autogenerated (but not at my end....?) work/xc/config/imake/Makefile The Xfree build process looks a little too involved for me to sus out right now - good luck and thanks.
I just do not really get the time to sit down and have a look at it. Will try to get to it real soon.
zach -- got any input?
lisa, got ideas?
What type of architectures are you trying to mix and which one is the powerpc-unknown-linux-gnu-gcc? (what are the other(s)? ) What arch is issuing the emerge command?
The ppc arch is doing the emerge, an x86 (athlon) is running the distcc server and ppc crosscompiler. But that's irrelevant - the problem isn't the mix of architectures, it's that the Makefile ignores CC=x-gcc in the environment.
Created attachment 14999 [details, diff] patch to current stable ebuild to inherit CC preference in xfree build The problem is that xfree build defines its own CC variable through "#define CcCmd gcc" in its config files. In order to inherit the CC=powerpc-unknown-linux-gnu-gcc needed for distcc to work (I tried this on a powerpc, with a pentium2 helping it through distcc), this patch makes the ebuild add "#define CcCmd ${CC}" to host.def when building. I'm not sure if this will break anything for others though, perhaps it would be best to put this in a test where it is only set if the CC env variable is NOT equal to "gcc".
Francois' patch works for me. If there is any doubt about whether it might break things for some people (which I don't think it will, unless perhaps Intel's CC can't build XFree?), could this perhaps be put into the snapshot ebuilds for testing? Now my complaint is that the get_number_of_jobs() function in the ebuild reduces the my MAKEOPTS from -j5 to -j2, which is a pain since I want the job to run over three distcc hosts. But that's a whole nother story (see bug 25294).
If no one has any objections I'll add this to 4.3.99.9 and 4.3.0-r3 a few days later.
Added to 4.3.99.9. Give it a try.
Added to 4.3.0-r2 and 4.3.0-r3.