First, you will need to emerge
Next, you will need to emerge
If you are cross-compiling between different subarchitectures for Intel x86 (e.g. i586 and i686), you must still build a full cross-toolchain for the desired CHOST, or else the compilation will fail. This is because i586 and i686 are actually different CHOSTs, despite the fact that they are both considered "x86." Please keep this in mind when you build your cross-toolchains. For example, if the target box is i586, this means that you must build i586 cross-toolchains on your i686 helper boxes.
In the default distcc setup, cross-compiling will
Fortunately, there is a workaround for this little problem. All it takes is a
wrapper script and a few symlinks on the box that will be running
$ ls -l total 0 lrwxrwxrwx 1 root root 15 Dec 23 20:13 c++ -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Dec 23 20:13 cc -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Dec 23 20:13 g++ -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Dec 23 20:13 gcc -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Dec 23 20:13 sparc-unknown-linux-gnu-c++ -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Dec 23 20:13 sparc-unknown-linux-gnu-g++ -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Dec 23 20:13 sparc-unknown-linux-gnu-gcc -> /usr/bin/distcc
Here is what you want to do:
# rm c++ g++ gcc cc
Next, we'll create the new script on this box. Fire up your favorite editor and
create a file with the following text in it, then save it as
#!/bin/bash exec /usr/lib/distcc/bin/sparc-unknown-linux-gnu-${0##*/} "$@"
Next, we'll make the script executable and create the proper symlinks:
# chmod a+x sparc-unknown-linux-gnu-wrapper # ln -s /usr/bin/distcc sparc-unknown-linux-gnu-cc # ln -s sparc-unknown-linux-gnu-wrapper gcc # ln -s sparc-unknown-linux-gnu-wrapper cc # ln -s sparc-unknown-linux-gnu-wrapper c++ # ln -s sparc-unknown-linux-gnu-wrapper g++
When you're done,
$ ls -l total 4 lrwxrwxrwx 1 root root 25 Jan 18 14:20 c++ -> sparc-unknown-linux-gnu-wrapper lrwxrwxrwx 1 root root 25 Jan 18 14:20 cc -> sparc-unknown-linux-gnu-wrapper lrwxrwxrwx 1 root root 25 Jan 18 14:20 g++ -> sparc-unknown-linux-gnu-wrapper lrwxrwxrwx 1 root root 25 Jan 18 14:20 gcc -> sparc-unknown-linux-gnu-wrapper lrwxrwxrwx 1 root root 15 Nov 21 10:42 sparc-unknown-linux-gnu-c++ -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Jan 18 14:20 sparc-unknown-linux-gnu-cc -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Nov 21 10:42 sparc-unknown-linux-gnu-g++ -> /usr/bin/distcc lrwxrwxrwx 1 root root 15 Jul 27 10:52 sparc-unknown-linux-gnu-gcc -> /usr/bin/distcc -rwxr-xr-x 1 root root 70 Jan 18 14:20 sparc-unknown-linux-gnu-wrapper
Congratulations; you now have a (hopefully) working cross-distcc setup.
When