From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130443 invoked by alias); 27 Jan 2017 17:31:36 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 130430 invoked by uid 89); 27 Jan 2017 17:31:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-languages-length:1719, twostep, two-step, schmiedl X-HELO: nm20-vm5.access.bullet.mail.bf1.yahoo.com Received: from nm20-vm5.access.bullet.mail.bf1.yahoo.com (HELO nm20-vm5.access.bullet.mail.bf1.yahoo.com) (216.109.115.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Jan 2017 17:31:25 +0000 Received: from [66.196.81.155] by nm20.access.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jan 2017 17:31:23 -0000 Received: from [98.138.226.240] by tm1.access.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jan 2017 17:31:23 -0000 Received: from [127.0.0.1] by smtp111.sbc.mail.ne1.yahoo.com with NNFMP; 27 Jan 2017 17:31:23 -0000 X-Yahoo-SMTP: 0h0Q7euswBD_g.kcEqbzJWRFfrba801gq1M1 Subject: Re: gcc for embedded linux To: Thomas Schmiedl , crossgcc@sourceware.org References: <12d5277b-89bd-db3a-9b1b-a50a1445f398@web.de> From: Alexey Neyman Message-ID: <857c0fda-f9f5-f38d-eb28-f3af710370e6@att.net> Date: Sat, 28 Jan 2017 21:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <12d5277b-89bd-db3a-9b1b-a50a1445f398@web.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00052.txt.bz2 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.