From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17072 invoked by alias); 18 May 2016 12:34:31 -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 17052 invoked by uid 89); 18 May 2016 12:34:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*free.fr, patrickdepinguingmailcom, patrickdepinguin@gmail.com, Hx-languages-length:2872 X-HELO: mail-lb0-f180.google.com Received: from mail-lb0-f180.google.com (HELO mail-lb0-f180.google.com) (209.85.217.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 May 2016 12:34:19 +0000 Received: by mail-lb0-f180.google.com with SMTP id n11so16872829lbh.1 for ; Wed, 18 May 2016 05:34:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wXbjctDBDNTXZJW3CbnbwMmd93eLFiAYNOUcbAa2Vyw=; b=O2LEe1IpXbuiTUruSH8ue0wprGnAC17baq+y8MvCPHK6+9qZcRZq3krb57oZwWepjU Aibf7OSXsReXO8tZVXsFWLPV2ZHrtSM/PpvsbKBr7dR22UxlFOpGLoDxRQeoltOJLuUG 54L8rtdAyPE6Nnz3dFcor98NgMLt0qDhVogc8rkWUB8iTrYp6OaTJEy4hFLggamIOqra Dyt1yhq9/Q/vG1b+8q6bj/lbeXS4fTcXND91AzCfTVUTmV2bUbQDVJGsUMz9xKDQouFT NBClHdLxoXHCOSucj16z3I4o6R2B6mfZxOqdN+HI6J9TIUFvdFAJ+jmxkTZiOIiTf7nn F7KA== X-Gm-Message-State: AOPr4FU9nMCmMbT1frx8v1BkkjV/mKLZc6fzOuneIFQHQvaCdilvIXh2oshbKBeZsv4nBR1oydcw9jSsFemLqg== X-Received: by 10.112.14.97 with SMTP id o1mr2446032lbc.17.1463574855995; Wed, 18 May 2016 05:34:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.154.7 with HTTP; Wed, 18 May 2016 05:33:56 -0700 (PDT) In-Reply-To: <7AA25A17-BFDC-4C29-835B-254A908C8288@gmail.com> References: <7AA25A17-BFDC-4C29-835B-254A908C8288@gmail.com> From: Thomas De Schampheleire Date: Wed, 18 May 2016 12:34:00 -0000 Message-ID: Subject: Re: Current state of multilib support (powerpc) To: Bryan Hundven Cc: crossgcc maillist , Ray Donnelly , Cody P Schafer , "Yann E. MORIN" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00008.txt.bz2 Hi Bryan, On Tue, May 17, 2016 at 3:50 PM, Bryan Hundven wrote: > >> On May 17, 2016, at 6:19 AM, Thomas De Schampheleire wrote: >> >> Hi, >> >> In 2014 there has been some work on multilib support in crosstool-ng, >> by Bryan Hundven, Cody P. Schafer, and Ray Donnelly. See e.g. mail >> threads [1] and [2]. >> >> It looks as if this work has not been integrated in crosstool-ng. >> Meanwhile also the bitbucket branch referenced in the threads no >> longer exists and I can't find the corresponding branches on github. >> >> What is the latest state of this work? >> Where are the latest patches? >> What are the remaining problems? >> >> I'm currently interested in a multilib toolchain 32/64 bit for >> Freescale e6500 processors. >> I ported one of Cody's patches to crosstool-ng 1.22.0 and the build >> advanced a bit further than with the 1.22.0 baseline, but now breaks >> at the 'pass-2 core C gcc compiler' step. >> >> Thanks, >> Thomas >> >> [1] https://sourceware.org/ml/crossgcc/2014-01/msg00054.html >> [2] https://sourceware.org/ml/crossgcc/2014-07/msg00014.html > > See here: https://github.com/crosstool-ng/crosstool-ng/pull/383 > > Please test and review. Interesting, thanks! I created a toolchain based on that PR with the following configuration: CT_PREFIX_DIR="${CT_TOP_DIR}/targets/${CT_TARGET}" CT_ARCH_CPU="e6500" CT_ARCH_64=y CT_ARCH_powerpc=y CT_MULTILIB=y CT_KERNEL_linux=y CT_KERNEL_V_3_18=y CT_BINUTILS_EXTRA_CONFIG_ARRAY="--enable-targets=powerpc-linux,powerpc64-linux" CT_CC_GCC_V_4_9_3=y CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-targets=powerpc-linux,powerpc64-linux" CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-targets=powerpc-linux,powerpc64-linux" CT_CC_GCC_MULTILIB_LIST="powerpc-linux,powerpc64-linux" CT_CC_LANG_CXX=y The idea is that 32-bit should be the default, without requiring additional options on the compiler command-line. When passing this toolchain to buildroot, applications seems to build fine in 32-bit (I did not try to run them yet). The kernel is also correctly built in 64-bit. However, there is something wrong for u-boot. I get errors like: /foo/output/host/usr/bin/powerpc64-unknown-linux-gnu-ld.bfd: Relocatable linking with relocations from format elf32-powerpc (arch/powerpc/cpu/mpc8xxx/cpu.o) to format elf64-powerpc (arch/powerpc/cpu/mpc8xxx/built-in.o) is not supported which indicates that the default format used by ld.bfd is 64-bit rather than 32-bit. If I manually replay this command-line with the additional -m elf32ppc, it seems to work correctly and a 32-bit builtin.o is created. What am I missing? Why is ld not taking 32-bit as default, while gcc is? (I did not post to the github PR because it may all be caused by a misconfiguration or misunderstanding on my part). Thanks, Thomas -- For unsubscribe information see http://sourceware.org/lists.html#faq