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
  • 27,918
  • 6
  • 53
  • 144

1 Answers1

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!