From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3771 invoked by alias); 6 Mar 2012 19:00:58 -0000 Received: (qmail 3761 invoked by uid 22791); 6 Mar 2012 19:00:57 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp06.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) (80.12.242.128) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Mar 2012 19:00:43 +0000 Received: from treguer.localnet ([90.32.32.224]) by mwinf5d29 with ME id iK0g1i00G4q8LWJ03K0hAu; Tue, 06 Mar 2012 20:00:42 +0100 From: "Yann E. MORIN" To: crossgcc@sourceware.org, Per-Arnold.Blaasmo@atmel.com Subject: Re: Error in multilib build when doing canadian cross Date: Tue, 06 Mar 2012 19:00:00 -0000 User-Agent: KMail/1.13.5 (Linux/3.2.9-treguer; KDE/4.4.5; x86_64; ; ) References: <4F55E91B.3030806@atmel.com> In-Reply-To: <4F55E91B.3030806@atmel.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203062000.40449.yann.morin.1998@anciens.enib.fr> 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 X-SW-Source: 2012-03/txt/msg00012.txt.bz2 On Tuesday 06 March 2012 11:38:19 Per Arnold Blaasmo wrote: > In gcc.sh you find the following: > if [ "${CT_MULTILIB}" = "y" ]; then > multilibs=( $( "${core_prefix_dir}/bin/${CT_TARGET}-gcc" > -print-multi-lib \ > |tail -n +2 ) ) > > This fails when trying to do a candian cross where target is win32. > The error is: > ..../scripts/build/cc/gcc.sh: line 413: > .../.build/arm-none-eabi/build/gcc-core-static/bin/arm-none-eabi-gcc: No > such file or directory This has already been fixed in the repository: http://crosstool-ng.org/hg/crosstool-ng/rev/4fcedd2c14b2 But since you bring up the problem, there still is an issue elsewhere in that same build script. On line 736, we have a similar construct (for the final gcc build): 780 if [ "${CT_MULTILIB}" = "y" ]; then 781 multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" -print-multi-lib \ 782 |tail -n +2 ) ) 783 if [ ${#multilibs[@]} -ne 0 ]; then 784 CT_DoLog EXTRA "gcc configured with these multilibs (besides the default):" 785 for i in "${multilibs[@]}"; do 786 dir="${i%%;*}" 787 flags="${i#*;}" 788 CT_DoLog EXTRA " ${flags//@/ -} --> ${dir}/" 789 done 790 else 791 CT_DoLog WARN "gcc configured for multilib, but none available" 792 fi 793 fi Looking at line 781, this would indeed not work for canadian crosses. So, we can not use the newly-built compiler to get the list of available multilibs... And because we are doping a canadian cross, we do *not* have the core gcc either. And the compiler that was used to build the C library (a step that you did not reach yet) might not be multilib aware either... So, I am afraid that multilib is currently a no-no for canadian crosses. Yes, that *is* a hard limitation. Fortunately, I already have some patches localy, that do revamp the canadian case code-path. In this rework-in-progess, the core compilers will actually be built, so there will no longer be a requirement for a target cross-compiler to pre-exist, so we'll be able to query the core compiler to get the multilib listing, even (and especially) ion the canadian case. Quoting again that part of the message: > .../.build/arm-none-eabi/build/gcc-core-static/bin/arm-none-eabi-gcc So, you are building for a bare-metal target? That's probably why you have an issue in the core compiler code, because the core compiler code path is used to build the bare-metal final gcc. So, again, for canadian cross, we would not be able to call the newly-built core compiler (which is in fact a final compiler)... When I thought I had most bases covered, and a quiet evening in sight!... Sigh... ;-) Thanks for pointing the issue! :-) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq