From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35750 invoked by alias); 21 May 2016 19:46:05 -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 35734 invoked by uid 89); 21 May 2016 19:46:03 -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=playing, crosstool-ng, crosstoolng, Hx-languages-length:4924 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; Sat, 21 May 2016 19:46:01 +0000 Received: by mail-lb0-f180.google.com with SMTP id k7so23966866lbm.0 for ; Sat, 21 May 2016 12:46:01 -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=3Oaa59nauDgpQYxSzlqYZ1Wjv6kVFAzn++owZS7gSK4=; b=Vr56Ag5TP6RPe2Gx2iwwuAIFG0Zu8hdiAB748Ci/ELN2cjVNHY2CuG5U7ox+Gxrujq ZPDCWxKzIgOXGkeFVcqfLOf2lusIpZq0ZCR4yB5GhCGLtwRV6HAo2abNiSH3C6/HpQEp QtWk4tK7AcBnqkAk9sDIxMz4t/Pl9PzX6BxN6Gl44bxyh7VH8N4EJwD+a0OF/78tjGOS yii+KW/W9n3VC0sS0039y3f0MeaRat+9X574pq4YEAl9dIJ7Fy9hDIg5PzjlznBX2wV+ EzGTRA+X1SXYzFVuLNZhExGqx8onm1kclgIXuHIwtXxdmdtAxIFCzj/t7IhhpLcOv5Pd H3pQ== X-Gm-Message-State: AOPr4FURKvgNdUielAEaEd10Db8NSe7gUUNuBwAakWQAyB5e27Yhb+no178b/Stv+zoUf4DJCAll/au2338swg== X-Received: by 10.112.133.130 with SMTP id pc2mr2727911lbb.99.1463859958016; Sat, 21 May 2016 12:45:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.154.7 with HTTP; Sat, 21 May 2016 12:45:38 -0700 (PDT) In-Reply-To: <573FF08B.5060209@att.net> References: <7AA25A17-BFDC-4C29-835B-254A908C8288@gmail.com> <06BBAE1D-12F6-4756-8811-6E728E036599@gmail.com> <573D4734.60909@att.net> <573D596D.9020505@att.net> <573FF08B.5060209@att.net> From: Thomas De Schampheleire Date: Sat, 21 May 2016 19:46:00 -0000 Message-ID: Subject: Re: Current state of multilib support (powerpc) To: Alexey Neyman Cc: Cody P Schafer , "Yann E. MORIN" , Ray Donnelly , crossgcc maillist , Bryan Hundven Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00020.txt.bz2 On Sat, May 21, 2016 at 7:22 AM, Alexey Neyman wrote: > > > On 05/19/2016 12:15 AM, Thomas De Schampheleire wrote: >> [..] >> >> I can reproduce the issue with the upstream config called 'T2080RDB'. >> Excerpt from the log: >> >> >> /foo/output/host/usr/bin/powerpc64-unknown-linux-gnu-gcc >> -Wp,-MD,board/freescale/common/.fman.o.d -nostdinc -isystem >> >> /foo/output/host/opt/ext-toolchain/bin/../lib/gcc/powerpc64-unknown-linux-gnu/4.9.3/include >> -Iinclude -I./arch/powerpc/include -I./board/isam_common >> -I./board/freescale/t208xrdb -include ./include/linux/kconfig.h >> -D__KERNEL__ -D__UBOOT__ -DCONFIG_SYS_TEXT_BASE=0xeff40000 -Wall >> -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding >> -Os -fno-stack-protector -g -fstack-usage -Wno-format-nonliteral >> -Werror=date-time -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float >> -mno-string -fno-delete-null-pointer-checks -mno-spe -fpic >> -mrelocatable -ffunction-sections -fdata-sections -meabi -pipe >> -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(fman)" >> -D"KBUILD_MODNAME=KBUILD_STR(fman)" -c -o >> board/freescale/common/fman.o board/freescale/common/fman.c >> >> /foo/output/host/usr/bin/powerpc64-unknown-linux-gnu-ld.bfd -n -r >> -o board/freescale/common/built-in.o board/freescale/common/fman.o >> board/freescale/common/vid.o board/freescale/common/sys_eeprom.o >> >> /foo/output/host/usr/bin/powerpc64-unknown-linux-gnu-ld.bfd: >> Relocatable linking with relocations from format elf32-powerpc >> (board/freescale/common/fman.o) to format elf64-powerpc >> (board/freescale/common/built-in.o) is not supported >> s >> >> >> Be aware that I'm building with Buildroot, meaning that the compiler >> (not linker) is wrapped. When calling that wrapper, the real compiler >> is called with following extra options: >> >> --sysroot' >> '/home/tdescham/repo/isam/buildroot-fantg/output/host/usr/powerpc-buildroot-linux-gnu/sysroot' >> '-mcpu=e6500' > > I don't have your buildroot tree; I tried creating the wrapper with just > -mcpu=e6500 added. But it fails in U-Boot build for T2080_RDB even before > linking built-in.o: > > CC arch/powerpc/cpu/mpc8xxx/cpu.o > {standard input}: Assembler messages: > {standard input}:512: Error: junk at end of line: `128' > scripts/Makefile.build:280: recipe for target > 'arch/powerpc/cpu/mpc8xxx/cpu.o' failed > make[2]: *** [arch/powerpc/cpu/mpc8xxx/cpu.o] Error 1 Yes, I saw those same messages too (Buildroot builds u-boot in parallel by default so it did not immediately fail the entire build). > > Using U-Boot 2016.05. Which version are you using? Is it possible that the > sysroot contains something that changes GCC options (e.g. a gcc spec file)? This is based on U-Boot 2015.01. We are not manually playing with anything like spec files. The toolchain produced by crosstool-ng is archived and configured in Buildroot as external toolchain. Then the usual Buildroot toolchain logic is applied, which basically is unpacking part of the archive, and producing a wrapper for the compiler that passing the necessary --sysroot, -march/mtune/mcpu, etc. options as configured by the user or built-in in Buildroot. > > > I did reproduce your issue, though, by running the commands you quoted > above, manually. > > The problem is that U-boot invokes ld directly, not through gcc; and ld is > indeed defaulting to 64-bit. Such issues pass by in Buildroot regularly. There have been discussions on producing a wrapper for ld too, which can then explicitly give the right flags e.g. -m32 in this case. So far it's not done. > You toolchain config supplies --enable-targets > to binutils configure, but binutils configure does not handle this option; > the preferred mode is established by the supplied target. > > Hence, you should build for powerpc, not for powerpc64 - that still allows > --enable-targets option to gcc configure, so you'll still be able to build > 64-bit binaries: > > --- email-defconfig 2016-05-18 20:02:57.565718947 -0700 > +++ email-defconfig.mod 2016-05-20 20:34:22.566050597 -0700 > @@ -1,11 +1,9 @@ > 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" > Thanks! With this config I was able to build u-boot just fine (on the T2080RDB defconfig I still had the 'junk at end of line' assembler messages, but not on my real board). I will now further evaluate the generated image. In any case it looks like the toolchain works fine now, and the pull request is doing its job. Thanks for your help, Thomas -- For unsubscribe information see http://sourceware.org/lists.html#faq