[U-Boot] [PATCH v4 0/8] Provide a mechanism to avoid using #ifdef everywhere

Albert ARIBAUD albert.u.boot at aribaud.net
Sun Jun 23 09:29:32 CEST 2013


Hi Simon,

On Mon, 17 Jun 2013 07:44:52 -0700, Simon Glass <sjg at chromium.org>
wrote:

> Note that a config_drop.h file is added - this defines all the CONFIGs
> which are not used in any board config file. Without this, autoconf cannot
> define the macros for this CONFIGs.
> 
> Compile time for main.c does not seem to be any different in my tests. The
> time to perform the 'dep' step (which now creates autoconf.h) increases,
> from about 2.8s to about 4.6s. This additional time is used to grep, sed
> and sort the contents of all the header file in U-Boot. The time for an
> incremental build is not affected.
> 
> It would be much more efficient to maintain a list of all available CONFIG
> defines, but no such list exists at present.

Stop me if I am wrong, but do you not have this list already, since at
one point you grep, sed and sort the whole list of config options, then
at another point generate the list of unused ones?

Granted, that's the list of config options defined, not necessarily the
list of options used, but a second variation of the grep/sed/sort might
give you a hint on that.

Plus, I would love having scripts in tools/ that look for either
defined or used config options.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list