[Buildroot] [PATCH 1/2] toolchain: wrap 'ld' so that a ld emulation can be specified
hwoarang at gentoo.org
Thu Jun 6 09:13:21 UTC 2013
On 6 June 2013 09:56, Markos Chandras <hwoarang at gentoo.org> wrote:
> On 6 June 2013 09:51, Thomas Petazzoni
> <thomas.petazzoni at free-electrons.com> wrote:
>> Dear Markos Chandras,
>> On Thu, 6 Jun 2013 09:31:25 +0100, Markos Chandras wrote:
>>> My understanding is that this is also a problem with buildroot
>>> toolchains as well. So whilst your patch fixes the problem with
>>> toolchains, MIPS64/n64 buildroot toolchains will still have the same
>> Yes, I do remember your patch
>> http://patchwork.ozlabs.org/patch/244694/. Normally, for internal
>> toolchains, the idea is that the tools (gcc, ld) are configured, at
>> build time, to produce the 'right' code by default, without requiring
>> any tuning. The man page of 'ld' says:
>> -m emulation
>> Emulate the emulation linker. You can list the available
>> emulations with the --verbose or -V options.
>> If the -m option is not used, the emulation is taken from the
>> "LDEMULATION" environment variable, if that is defined.
>> Otherwise, the default emulation depends upon how the linker
>> was configured.
>> The last paragraph being the important one here. See what OpenEmbedded
>> is doing:
>> The problem here is that the MIPS tuples do not contain the ABI, so the
>> ld/configure.tgt and bfd/config.bfd scripts of binutils have no way of
>> knowing which emulation you would like to have by default. Maybe we
>> need to improve binutils to make this configurable?
>> Thomas Petazzoni, Free Electrons
>> Kernel, drivers, real-time and embedded Linux
>> development, consulting, training and support.
> Hi Thomas,
> Yes I've seen this patch before but given this is not in the upstream
> binutils code I had to "workaround" it by using the exported
> LDEMULATION variable. It might worth taking this to the binutils
> mailing list.
> Markos Chandras - Gentoo Linux Developer
Just tested this patch. Looks good to me.
Tested-by: Markos Chandras <markos.chandras at imgtec.com>
Markos Chandras - Gentoo Linux Developer
More information about the buildroot