[U-Boot] [PATCH 1/3] The BUILD_BUG_ON macros moved from ubi_uboot.h to common.h

Michael Zaidman michael.zaidman at gmail.com
Mon Apr 5 19:52:14 CEST 2010


On Sat, Apr 3, 2010 at 3:47 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Saturday 03 April 2010 04:23:58 Michael Zaidman wrote:
>> On Fri, Apr 2, 2010 at 9:22 PM, Mike Frysinger wrote:
>> >> I have a doubt however -  what about location of similar staff such as
>> >> BUG, BUG_ON, debug, error, etc. Should it also be moved into compiler.h
>> >> file?
>> >
>> > many should not.  BUG_ON requires functions that only u-boot implements
>> > and are not available in host C libraries.
>>
>> So why do not place all useful staff which pass the compilation into
>> compiler.h file?
>
> i just told you why: only things that work with general C libraries/compilers
> may go into compiler.h.  BUG_ON does not fall into that category.
> BUILD_BUG_ON does.
> -mike
>
Thanks, I understood this. All I am trying to say is that the
compiler.h file probably is not the best choice for such things
hosting. The fact that it is the common header file _ONLY_ between
u-boot and host tools code does not mean that we should fill it with
all kind of things we would share between both codes. And if we see
necessity to shared some useful definitions perhaps it makes sense to
place them into the header file especially dedicated for this purpose.
-michael


More information about the U-Boot mailing list