[distcc] Wrapper for different GCC versions.

Daniel Beecham joshu at goobah.org
Tue Aug 26 19:05:39 GMT 2008


Hi there everyone.
First post here, so to introduce me, I'm Daniel. :-)

I have three computers, a Gentoo hardened server, a Gentoo desktop and a 
Gentoo laptop. All run core2duo, but i don't want to give the server 
anything unstable, like the gcc 4.3.

Well, anyway, i've compiled gcc 4.3 (called via /usr/bin/gcc-4.3.1), and 
i want everything compiled by the server (for the laptop/desktop) via 
distcc to be of that version. Searching, i've found 
(http://lists.samba.org/archive/distcc/2006q4/003468.html) a previous 
mail by this mailing list where Patrick shows his way of doing it. 
Here's how it looks for me (thank you, Patrick):

sh-3.2# cd /usr/lib/distcc/bin/
sh-3.2# ls -la
total 16
drwxr-xr-x 3 root   root 4096 Aug 26 20:05 .
drwxr-xr-x 3 root   root 4096 Aug 26 13:04 ..
drwxr-xr-x 2 root   root 4096 Aug 26 15:30 .backup
-rw-r--r-- 1 distcc  240    0 Aug 26 15:13 .keep_sys-devel_distcc-0
lrwxrwxrwx 1 root   root    7 Aug 26 15:28 c++ -> wrapper
lrwxrwxrwx 1 root   root    7 Aug 26 15:28 cc -> wrapper
lrwxrwxrwx 1 root   root    7 Aug 26 15:28 g++ -> wrapper
lrwxrwxrwx 1 root   root   15 Aug 26 15:30 g++-4.3.1 -> /usr/bin/distcc
lrwxrwxrwx 1 root   root    7 Aug 26 15:28 gcc -> wrapper
lrwxrwxrwx 1 root   root   15 Aug 26 15:29 gcc-4.3.1 -> /usr/bin/distcc
-rwxr-xr-x 1 root   root   60 Aug 26 15:27 wrapper
lrwxrwxrwx 1 root   root    7 Aug 26 15:30 x86_64-pc-linux-gnu-c++ -> 
wrapper
lrwxrwxrwx 1 root   root    7 Aug 26 15:30 x86_64-pc-linux-gnu-g++ -> 
wrapper
sh-3.2# cat wrapper
#!/bin/bash
exec /usr/lib/distcc/bin/g${0:$[-2]}-4.3.1 "$@"

But, trying to compile, it tells me the gcc 4.3-only flag -march=core2 
is a bad value. (as if it's using gcc 3.4.6. Am i doing something wrong?

Thanks.
Daniel.


More information about the distcc mailing list