Bug 87859 - Suggestion for distcc improvement in a multi-architecture network
|
Bug#:
87859
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: All
|
Status: RESOLVED
|
Severity: enhancement
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: morfic@gentoo.org
|
Reported By: adq_dvb@lidskialf.net
|
|
Component: Development
|
|
|
URL:
|
|
Summary: Suggestion for distcc improvement in a multi-architecture network
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2005-04-03 18:39 0000
|
This is just a suggestion for a change I've found to be useful. Feel free to
ignore if it its not any good :) I just thought it might be handy.
The problem is machine A is i686-pc-linux-gnu. machine B is
powerpc-pc-linux-gnu (well actually its not in my network, but this is a better
example for various reasons).
Now I can install a cross compiler on B so that A can distribute jobs to it no
problem, as long as machine A uses the full compiler name -
i686-pc-linux-gnu-XXX.
However, there is an issue with the current symlinks in /usr/lib/distcc/bin on
machine A.
Since cc,c++,gcc,g++ are just linked directly to distcc, machine B will be
asked to invoke just 'gcc', where really it should be asked to invoke
i686-pc-linux-gnu-gcc. The result is the compilation fails because it will be
asked to use an (i386 based) architecture it knows nothing about.
This is fixable with a simple change to distcc-config - instead of symlinks for
cc,c++,gcc,g++, create shell scripts like the following on machine A (this
would be called g++):
#!/bin/sh
exec x86_64-pc-linux-gnu-g++ "$@"
This way, it will always use the full compiler name with distcc, which will
then be passed to machine B, which will then invoke the correct cross compiler.
Theres a sample version of distcc-config patched to do this at
http://lidskialf.net/distcc-config.
sorry, the sample script I included should be:
#!/bin/sh
exec i686-pc-linux-gnu-g++ "$@"
Too many machines here :)
Can you post a diff of your distcc-config and the one in Portage please?
Created an attachment (id=56655) [details]
Example modification to use shell scripts
Here you go. It now also creates a 'cc' shell script, which calls ${ARCH}-gcc
since none of the cross compilers I created installed a ${ARCH}-cc link.
Markus, what do you think of this for the next version?
i don;t know about he change to distcc-config
but i surely agree that the exec fullpath-gcc "$@" and exec fullpath-g++ "$@"
scripts should be required to allow proper cross compiling, i didn't test the
distc-config change yet, i simply as suggested by agaffney made gcc and g++ said
scripts, linked CC and C++ to gcc and g++ respectively and now qt and boost
compile as they should since the correct compiler is invoked on the host
if this should be behind a USE flag, so be it :) at least it keeps us from
having to setup manually a working cross compile capable distcc each time we upgrade
if anyone can think of a way to get the ful path/name over to the host w/o
shells, would be great, until then, this is good stuff
sorry, i always forget to add me to CC: with the comment
can i add it then if you are too busy?
As I'm too busy with other stuff right now, just go ahead, morfic.
2.18.3-r8 is now in portage, thanks Andrew