[U-Boot] [PATCH 1/5] x86: Fix compilation on 64-bit build machines

Graeme Russ graeme.russ at gmail.com
Wed Nov 28 22:41:55 CET 2012


Hi Simon,


On Thu, Nov 29, 2012 at 8:18 AM, Graeme Russ <graeme.russ at gmail.com> wrote:
>
> Hi Simon,
>
> On Thu, Nov 29, 2012 at 6:46 AM, Simon Glass <sjg at chromium.org> wrote:
>>
>> Hi Graeme,
>>
>> On Tue, Nov 27, 2012 at 5:38 PM, Simon Glass <sjg at chromium.org> wrote:
>> > From: Graeme Russ <graeme.russ at gmail.com>
>
>
> [snip]
>
>>
>> > diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
>> > index baaa2fb..7c1ea5c 100644
>> > --- a/examples/standalone/Makefile
>> > +++ b/examples/standalone/Makefile
>> > @@ -98,7 +98,7 @@ $(ELF):
>> >  $(obj)%:       $(obj)%.o $(LIB)
>> >                 $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
>> >                         -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
>> > -                       -L$(gcclibdir) -lgcc
>> > +                       -L$(USE_PRIVATE_LIBGCC) -lgcc
>>
>> This forces all archs to use a private libgcc here, right? Is that the
>> intention? It seems to break some of the powerpc boards with my
>
>
> Eeep - no, that was not the intent. I did this so long ago I can't even
> remember why I did the USE_PRIVATE_LIBGCC

I've had a closer look, and I think this part of the patch is really a
hangover from commit 36b2409a3d469b5133d105fa12089429a1900bde (x86: Wrap
small helper functions from libgcc to avoid an ABI mismatch)

So the proper solution would be to break this patch into two patches - one
that fixes the libgcc/abi mismatch for examples/standalone and one that
fixes building on 64-bit build machines.

There might have been some discussion about the libgcc/regparm mismatch,
but I can't recall. I'm wondering if the option of dumping regparm was
considered. It really only impacts the code where there is a boundary
between .S and .c files and inline asm like in arch/x86/cpu/interrupts.c
Overall, it might be a cleaner solution

Regards,

Graeme


More information about the U-Boot mailing list