0

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?

Dmitry Grigoryev
28.3k6 gold badges55 silver badges148 bronze badges
asked Mar 8, 2016 at 13:42
3
  • Is there a reason you want to do this? Your desktop is obviously capable of compiling its own code. Commented Mar 8, 2016 at 16:46
  • @DavidYaw, I want to use distcc with three hosts: desktop, notebook and Pi. Commented Mar 8, 2016 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. Commented Mar 8, 2016 at 17:26

1 Answer 1

1

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!

answered Mar 11, 2016 at 17:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.