5

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:

  • 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?

4

1 回答 1

5

经过更多研究后再次尝试:

GCC 有一个描述 i386 和 x86-64 选项的页面。该-m64标志表示生成 64 位代码,但您还需要指定 CPU 类型-march=i686-march=k8类似类型,以使用正确的指令集。

由于 distcc 将 GCC 命令行标志发送出去,您应该尝试将这些添加到本地运行的 distcc 命令中,并跳过远程脚本来设置标志。

如果您在没有 distcc 的本地 x64 机器上测试体系结构标志,只需 g++,那么它应该在使用 distcc 时为您提供正确的二进制文件。

于 2011-01-12T22:45:42.637 回答