I want to build programs with distcc on a Raspberry Pi for my desktop (x86-64).

My idea:

  1. Build crossdev-ng on my desktop.
  2. Build cross-compiler on my desktop to run on desktop and generate code for Pi.
  3. Build cross-compiler on my desktop to run on Pi and generate code for desktop with gcc from step 2.

How to do the last action? Is it a right way?

  • Is there a reason you want to do this? Your desktop is obviously capable of compiling its own code. – David Yaw Mar 8 '16 at 16:46
  • @DavidYaw, I want to use distcc with three hosts: desktop, notebook and Pi. – val Mar 8 '16 at 16:54
  • If you're setting up a cross-compilation environment to compile ARM on your x86, then just follow those same instructions to set up a cross-compilation environment to compile x86 on your Pi. – David Yaw Mar 8 '16 at 17:26
up vote 1 down vote accepted

Use cnadian build type. Now, you have got directory with name like aarch64-unknown-linux-gnueabi (I call it cross-prefix). In configuration menu select Toolchain options, then Type, select Canadian. After this action, you can see Host system section! Enter cross-prefix (aarch64-unknown-linux-gnueabi in my case) into Tuple option (Host system section, NOT build system). Apply other changes (change target architecture to x86, etc.) and exit with saveing changes. Now, you need to add path to crosscompiler binares in your PATH. Run

export PATH="${PATH}:cross-prefix/bin"

Ok, tolchain is ready to build!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.