开发者

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 syst开发者_开发百科ems. 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:

  • I have installed the multilib package for g++ on that system. I am able to cross-compile to x64 locally using g++ -m64
  • Changed the link in /usr/lib/distcc/g++ to point to a script that explicity sets the -m64 parameter.

Any suggestions?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜