This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc for embedded linux


Hi,

On 01/27/2017 05:08 AM, Thomas Schmiedl wrote:
Hello,

I'm a newbie in cross-compiling and I'm not a developer. I hope someone could help me in this issue.

I try to install the Python-software Octoprint (http://octoprint.org/) on a mips-based router (Fritzbox) to control an USB-connected 3d-printer.

I cross-compiled Python 2.7.3 for mips with this tutorial: http://www.embedded-hacking.com/index.php/python-f%C3%BCr-embedded-linux-kompilieren.html and installed setuptools using this Python on the router. For the Octoprint installation and the additional Python-packages is a gcc required on the router. But there is no available on this embedded linux.

Is it possible to use this toolchain to cross compile a gcc for the router (mips binary) to compile the Python-packages on the router?
You need to build a so called "cross-native" toolchain (i.e. native toolchain built in a cross-compiling environment). Doing this is a two-step process with crosstool-ng:

First, you need a "simple cross" toolchain. Apparently, you already have it - it is the compiler/libraries that you used for building Python. Did you build that toolchain yourself, or did it come with the router?

Second, the cross-native toolchain, it is a case of a "canadian cross". Even though crosstool-ng has a separate option for "cross-native", I'd recommend against using it - use more general "Canadian" as the toolchain type (the "cross-native" option is marked experimental - it is not very well tested at this time). You need to ensure that the the compiler for the simple cross is in the $PATH, and configure the toolchain with matching kernel/libc versions.

Regards,
Alexey.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]