public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Alexey Neyman <stilor@att.net>
To: Thomas Schmiedl <thomas.schmiedl@web.de>, crossgcc@sourceware.org
Subject: Re: gcc for embedded linux
Date: Sat, 28 Jan 2017 21:33:00 -0000	[thread overview]
Message-ID: <857c0fda-f9f5-f38d-eb28-f3af710370e6@att.net> (raw)
In-Reply-To: <12d5277b-89bd-db3a-9b1b-a50a1445f398@web.de>

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.

      reply	other threads:[~2017-01-27 17:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 17:31 Thomas Schmiedl
2017-01-28 21:33 ` Alexey Neyman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=857c0fda-f9f5-f38d-eb28-f3af710370e6@att.net \
    --to=stilor@att.net \
    --cc=crossgcc@sourceware.org \
    --cc=thomas.schmiedl@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).