public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: Bryan Hundven <bryanhundven@gmail.com>
Cc: crossgcc maillist <crossgcc@sourceware.org>,
	Ray Donnelly <mingw.android@gmail.com>,
		Cody P Schafer <dev@codyps.com>,
	"Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: Re: Current state of multilib support (powerpc)
Date: Wed, 18 May 2016 12:34:00 -0000	[thread overview]
Message-ID: <CAAXf6LWecE7r_SwKBiZq1XO37nCfE2B0Js6Kc3EXPAjDt4Gvzw@mail.gmail.com> (raw)
In-Reply-To: <7AA25A17-BFDC-4C29-835B-254A908C8288@gmail.com>

Hi Bryan,

On Tue, May 17, 2016 at 3:50 PM, Bryan Hundven <bryanhundven@gmail.com> wrote:
>
>> On May 17, 2016, at 6:19 AM, Thomas De Schampheleire <patrickdepinguin@gmail.com> 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

  reply	other threads:[~2016-05-18 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17 13:20 Thomas De Schampheleire
2016-05-17 13:50 ` Bryan Hundven
2016-05-18 12:34   ` Thomas De Schampheleire [this message]
2016-05-18 21:11     ` Bryan Hundven
2016-05-19  4:46       ` Alexey Neyman
2016-05-19  4:55       ` Alexey Neyman
     [not found]         ` <CAAXf6LX3cPe2eF2BDfGiLDdCMbBq8TxPFGCWYawB8wCZ-yj-Xg@mail.gmail.com>
     [not found]           ` <573D596D.9020505@att.net>
2016-05-19  7:15             ` Thomas De Schampheleire
2016-05-21  5:22               ` Alexey Neyman
2016-05-21 19:46                 ` Thomas De Schampheleire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAXf6LWecE7r_SwKBiZq1XO37nCfE2B0Js6Kc3EXPAjDt4Gvzw@mail.gmail.com \
    --to=patrickdepinguin@gmail.com \
    --cc=bryanhundven@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=dev@codyps.com \
    --cc=mingw.android@gmail.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).