From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30715 invoked by alias); 28 Jun 2012 20:01:04 -0000 Received: (qmail 30701 invoked by uid 22791); 28 Jun 2012 20:01:02 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ee0-f49.google.com (HELO mail-ee0-f49.google.com) (74.125.83.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jun 2012 20:00:49 +0000 Received: by eekd17 with SMTP id d17so967360eek.36 for ; Thu, 28 Jun 2012 13:00:47 -0700 (PDT) Received: by 10.14.47.74 with SMTP id s50mr791666eeb.114.1340913647630; Thu, 28 Jun 2012 13:00:47 -0700 (PDT) Received: from localhost.localdomain (host-2-96-99-49.as13285.net. [2.96.99.49]) by mx.google.com with ESMTPS id m46sm817881eeh.9.2012.06.28.13.00.45 (version=SSLv3 cipher=OTHER); Thu, 28 Jun 2012 13:00:46 -0700 (PDT) Message-ID: <4FECB7ED.6040607@googlemail.com> Date: Thu, 28 Jun 2012 20:01:00 -0000 From: David Fernandez User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Stanislav Meduna CC: eCos Discussion References: <4FEB36EE.1030805@meduna.org> In-Reply-To: <4FEB36EE.1030805@meduna.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: Re: [ECOS] Re: eCos arm-eabi GNU tools - test release 4.6.3-20120623 X-SW-Source: 2012-06/txt/msg00059.txt.bz2 On 27/06/12 17:38, Stanislav Meduna wrote: > On 27.06.2012 18:22, David Fernandez wrote: > >>> You will find multilibs for all architectures of interest for eCos under >>> gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/ directory. This multilib >>> configuration is produced by gcc-4.6.3-ecos-120524_t-arm-elf.diff. >> Ilija, are you then saying that gcc does not do it right as-is, and we >> need to patch it? > FWIW I do not remember such problems - I am compiling for an ARM9 > and a thumb2 with the same toolchain and it works. I did not test > 4.6.3 specifically, but it worked for 4.5.something compiled > under MinGW (although with other problems) and works for 4.7 > canadian cross (built on linux targeting MinGW and compiling > for eCos). It will work with ARM9, because the default options will generate ARM32 code. But, if you compiled that gcc for newlib, then if you try to compile code for Cortex-M3, which runs only in thumb-2 mode, or just with -mthumb, then you will get in trouble, as your crt0.o will have ARM32 code, unless you disable the startup files, as eCos does in (almost) all cases. The fact that you have to change the default options explicitly (--with-cpu=cortex-m3 --with-mode=thumb --with-arch=armv7-m) to get crt0.S compiled in thumb-mode, means that newlib is not getting compiled multiple times to support all the cpus that arm-eabi-gcc allows you to compile for. So I wonder if that is a problem of newlib not being compliant with gcc multilib, or if it is the gcc build system that does not work well with other libraries like newlib (have not tested if the same happens for the standard gcc C library), or if I'm missing some configure parameter or gcc build procedure. > As far as I remember the abovementioned patch only tweaks what > multilibs from the zillion possible actually get build. That might solve the problem if it makes gcc to compile newlib with -mcpu=cortex-m3 -mthumb -march=armv7-m, in addition to the default -marm (and whatever default cpu and architecture it uses when not explicitly told). > I can't rule out some other patch affecting it, but in case > of such problems I'd suspect some bash/autotools/make/sed/whatever > incompatibility first. Trying in a from-scratch environment > is the first step. > That might be, but I check that I get the latest distro packages for them... I wonder if there is some version requirements for those indicated anywhere for each gcc version. Let me know if you find something. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss