[U-Boot] [PATCH] Link the correct libgcc.a on ARMv4T architecture

Paul Hsu pochun.hsu at gmail.com
Wed Sep 8 11:25:09 CEST 2010


On Wed, Sep 8, 2010 at 5:05 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Paul Hsu,
>
> In message <AANLkTin=dbkiHNGHO2W+knxaC3mk9TFJacQD9d8BwTHf at mail.gmail.com> you wrote:
>>
>> > On which tool chain is this causing problems?
>>
>> I use toolchain released by code sourcery(Sourcery G++ Lite 2010q1-202
>> for ARM GNU/Linux).
>
> Thanks for the information.
>
>> > And how does this problem manifest?
>
> You did not answer this question.  Do you bet build errors? Or does
> the build complete, but U-Boot does not work correctly?

Build process is complete, but U-Boot does not work correctly.
Because of linking the wrong version libgcc.a, which contains armv5 instruction
such that arm core raises a undefined instruction exception then code hanged.

>
>
>> > NAK. If really needed, this needs to be fixed in ARM specific config
>> > files / Makefiles, not in the top level Makefile.
>>
>> I agree that we should find a better place to put ARM specific config in.
>> But currently, top level Makefile is the one I found.
>> Any suggestion?
>
> arch/arm/config.mk ?

I found another way to solve this issue.

In arch/arm/cpu/arm920t/config.mk, change this line from
PLATFORM_CPPFLAGS += -march=armv4
to
PLATFORM_CPPFLAGS += -march=armv4t

Then everything goes well.
This solution won't make any modification on top level Makefile.

But I don't know exactly that the solution will incur other side effect or not?

BTW, If this solution is the right thing to do, shall I issue another patch?

BR,
Paul




>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> If some day we are defeated, well, war has  its  fortunes,  good  and
> bad.
>        -- Commander Kor, "Errand of Mercy", stardate 3201.7
>



-- 
    許伯鈞(Paul Hsu)
    pochun.hsu at gmail.com


More information about the U-Boot mailing list