c++linux32bit-64bitubuntu-10.10distcc

Cross compile x86_64 on i686 system on Ubuntu with distcc


I am attempting to setup a small build cluster at home using distcc. There are two x64 systems and 1 i686 systems. All systems are running Ubuntu 10.10 and are up to date. The system that is initiating the build is x64. Distcc works fine between the two x64 systems but all build tasks sent to the i686 system fail.

So far:

Any suggestions?


Solution

  • Attempting this one again after more research:

    GCC has a page describing the i386 and x86-64 options. The -m64 flag says to generate 64-bit code, but you'll also want to specify the type of CPU with -march=i686 or -march=k8 or similar, to use the correct instruction set.

    Since distcc sends the GCC command line flags out, you should try adding these to the distcc command running locally and skip the remote script for setting flags.

    If you test the architecture flags on your local x64 machine without distcc, just g++, then it should give you the right binaries when using distcc.