On Sun, Oct 23, 2011 at 04:35, Wolfgang Denk wrote:
> Simon Glass wrote:
>> > Can you please #ifdef it so it doesn't get added for the non-debug
>> > case, too?
>>
>> Well I could, but then if someone defines DEBUG in a file they will
>> get a link error I think. Or are you thinking of adding a new CONFIG
>> which *permits* people to use DEBUG?
>
> I don't understand what you mean.
>
> __assert_fail() only ever gets used (and thus needs to be compiled in)
> if DEBUG is defined, right?  SO why cannot you wrap the code in a
> "#ifdef DEBUG" ?

people often enable DEBUG on a per file basis.  so if i'm debugging
drivers/spi/bfin_spi.c, i put "#define DEBUG" at the top of it.
-mike
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to