[U-Boot] [RFC PATCH 07/22] arm: Refactor bootm to reduce #ifdefs

Simon Glass sjg at chromium.org
Fri Jan 11 16:42:05 CET 2013


Hi Marek,

On Fri, Jan 11, 2013 at 3:10 AM, Marek Vasut <marex at denx.de> wrote:
> Dear Simon Glass,
>
>> With fewer #ifdefs the code is more readable and more of the code is
>> compiled for all boards. Add defines in the header file to control
>> what features are enabled, and then use if() instead of #ifdef.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>
> Did you try building it with ELDK 4.2 and check if there's no size growth?

buildman says:

08: arm: Refactor bootm to reduce #ifdefs
       arm: (285 boards)   spl/u-boot-spl:text -0.0   text -7.9   bss +1.0

so no size growth there with 4.4.1 (the numbers are changes in bytes
for that section averaged over all boards).

The code is basically equivalent, just using a compile-time check instead.

gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202)

>
> Best regards,
> Marek Vasut

Regards,
Simon


More information about the U-Boot mailing list