2015-04-21 6:32 GMT+09:00 Marek Vasut <ma...@denx.de>: > On Monday, April 20, 2015 at 10:27:02 PM, Pavel Machek wrote: >> On Mon 2015-04-20 21:23:23, Marek Vasut wrote: >> > On Monday, April 20, 2015 at 02:30:48 PM, Pavel Machek wrote: >> > > Setting configuration options in header file leads to incosistency >> > > between .config user sees, and .config he has. What is worse, a lot of >> > > compile warnings is presented for any such config option user sets in >> > > .config. >> > >> > Can you please elaborate on such warnings ? >> >> Lets remove CONFIG_CMD_RUN from .config, then select it: >> >> run (CMD_RUN) [N/y/?] (NEW) y >> >> Now you warning for most C files: >> >> CC arch/arm/lib/asm-offsets.s >> In file included from include/configs/socfpga_cyclone5.h:16:0, >> from include/config.h:5, >> from include/common.h:18, >> from >> arch/arm/lib/asm-offsets.c:15: >> include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" >> redefined [enabled by default] >> #define CONFIG_CMD_RUN /* run command in env variable */ >> ^ >> In file included from ././include/linux/kconfig.h:4:0, >> from <command-line>:0: >> include/generated/autoconf.h:35:0: note: this is > > That meant CONFIG_CMD_RUN is defined by default, yes? In which case, > this patch would just paper over some bug (?) instead of fixing the > root cause ? The correct fix would probably be to zap those macros, > which are defined by default from the socfpga_cyclone5.h file, no ?
We usually define boolean macros without values, like #define CONFIG_CMD_ASKENV #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_CACHE On the other hand, Kconfig define boolean macros as 1 (see include/generated/autoconf.h) That is why the compiler spits tons of warnings. -- Best Regards Masahiro Yamada _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot