On Mon, Mar 23, 2015 at 06:18:46PM -0400, Mike Gilbert wrote > You will probably need to add -m32 to CFLAGS to avoid building 64-bit > objects on the 64-bit machine.
How could i686-pc-linux-gnu-gcc build 64-bit stuff in the first place? I followed the instructions, and ran the following on the host 64-bit machine... [d531][root][~] crossdev -t -S i686-pc-linux-gnu [d531][root][~] i686-pc-linux-gnu-gcc --version i686-pc-linux-gnu-gcc (Gentoo 4.9.2 p1.2, pie-0.6.2) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [d531][root][~] echo 'int main(){return 0;}' > ctest.c [d531][root][~] i686-pc-linux-gnu-gcc -Wall ctest.c -o ctest [d531][root][~] file ctest ctest: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, not stripped Here's how far I've gotten with the setup. Let me know if I'm missing anything... ========================================================================= On the host; 64-bit Gentoo on Core2; IP address 192.168.123.251 # emerge crossdev # crossdev -t -S i686-pc-linux-gnu # emerge distcc edit /etc/conf.d/distccd to indicate allowed client(s). Change the DISTCCD_OPTS line to... DISTCCD_OPTS="--port 3632 --log-level notice --log-file /var/log/distccd.log -N 15 --allow 192.168.123.253 get distccd service running now and every boot up (OpenRC)... # rc-update add distccd default # rc-service distccd start I believe it's OK to leave "-march=native" in the host's make.conf ========================================================================= On the client; underpowered ancient 32-bit Atom netbook; 192.168.123.253 # emerge distcc specify host(s) # /usr/bin/distcc-config --set-hosts "192.168.123.251" This modifies /etc/distcc/hosts In make.conf make the following changes MAKEOPTS="-j1 -l2" add "distcc distcc-pump" to FEATURES variable Replace "-march=native" in CFLAGS with output of... # gcc -v -E -x c -march=native -mtune=native - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+//g; s/^.* - //g;' Note that the distcc wiki page gives different instructions here than the crossdev wiki page. The command goes out of its way to remove the "-mno-<whatever>" compiler flags. This results in (one long line)... CFLAGS="-O2 -march=atom -msahf -mmovbe -mfxsr --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -fstack-protector -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables" Note that I include "-mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables" myself. ========================================================================= Now for the questions... 1) https://wiki.gentoo.org/wiki/Distcc#Using_distcc_with_automake mentions adding... export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}" ...to /etc/env.d/ Is this necessary for Portage/emerge/etc, or is "automake" something separate? (You can tell I'm not a programmer, let alone a developer.) 2) The docs mention running emerge on the client with the command... # pump emerge -u world Is that all there is, or am I missing something? Does it "automagically" install properly? Can I assume that... a) The "pump" command does the lookup in /etc/distcc/hosts for the appropriate server b) The line... CHOST="i686-pc-linux-gnu" ...in the client's make.conf is sufficient to tell emerge to use "/usr/bin/i686-pc-linux-gnu-gcc" on the host and not "/usr/bin/gcc"? 3) Is this supposed to happen on the host... ===================================================== [d531][waltdnes][~] gcc-config -l [1] i686-pc-linux-gnu-4.9.2 * [2] x86_64-pc-linux-gnu-4.8.3 * ===================================================== Note that the asterisk after "x86_64-pc-linux-gnu-4.8.3" is green. 4) Is the command... # DISTCC_DIR="" distccmon-text 5 Or: # DISTCC_DIR="" distccmon-gnome ...supposed to be run from a seprate terminal? -- Walter Dnes <waltd...@waltdnes.org> I don't run "desktop environments"; I run useful applications