[U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation

Daniel Schwierzeck daniel.schwierzeck at googlemail.com
Sat Nov 5 14:43:21 CET 2011


Hi Albert,

On 05.11.2011 10:16, Albert ARIBAUD wrote:
> Hi all,
>
> Le 04/11/2011 18:56, Wolfgang Denk a écrit :
>> Dear Daniel Schwierzeck,
>>
>> In
>> message<CACUy__XY1873+dT-s=-GyPeBq5hnYsmYwWt-gxEXiwY97EcGdg at mail.gmail.com>
>> you wrote:
>>>
>>> Should we change it? is the semantic still the same?
>>
>> I'm not sure. At first reading it doesn't look really the same to me.
>
> They are not, at least for ELDK4.2.
>
> The only difference is in -mabi options, where the change would reduce
> "-mabi=apcs-gnu -mabi=aapcs-linux" to "-mabi=aapcs-linux".
>
> apcs-gnu, IIUC, is 'old ABI', while 'aapcs-linux' is 'new ABI', aka
> eabi. Most of the toolchains I see are eabi (ELDK and CS notably). There
> may be 'old ABI' toolchains out there, but I don't think they are old
> ABI either.
>
> Anyway, I've just tried ./MAKEALL edminiv2 with ELD42 and a couple of CS
> toolchains, and nowhere in the log does -mabi=apcs-gnu show up -- the
> gcc invocations only have -mabi=aapcs-linux.

Looks like I read it wrong. So you always want "-mabi=apcs-gnu 
-mabi=aapcs-linux -mno-thumb-interwork" in $(PF_CPPFLAGS_ABI) with EABI? 
Sorry but I am not an ARM expert ;)

>
> I've also tested making ED Mini V2 with and without the patch but
> without Daniel's proposed change to arch/arm/config.mk, and there is no
> difference in build commands (except that for some reason the patch
> inserts multiple spaces between some gcc invocation options.

I guess this comes from making the macros more readable. Maybe I can 
optimize this.

>
> Daniel, what do you mean with "does not work correctly"?

that the generated cache file looks not right

CC_OPTIONS += -mabi=apcs-gnu
CC_OPTIONS_NOP += -mabi=apcs-gnu
CC_OPTIONS += -mno-thumb-interwork
CC_OPTIONS += -mabi=aapcs-linux -mno-thumb-interwork

But if you want "-mabi=apcs-gnu -mabi=aapcs-linux -mno-thumb-interwork" 
then it should already work correctly without my change in
arch/arm/config.mk.

Best regards,
Daniel



More information about the U-Boot mailing list