[U-Boot] [patch] rm9200 ethernet driver: board-specific quirk (csb337)

David Brownell david-b at pacbell.net
Sat Jun 13 19:19:01 CEST 2009


On Saturday 13 June 2009, Mike Frysinger wrote:
> > > > > See above.  There already *IS* such an #ifdef, but it's just not
> > > > > cluttering up the guts of that driver.
> > > >
> > > > you adding MUST have NO size impact on other board
> > > >
> > > > if we apply you code as it we will increase the size of u-boot for
> > > > every rm9200 board that use the ethernet

Not on any compiler I've used for at least the past dozen years or so.


> > > i dont get it.  the CPP expands into if(0) and unless you have a
> > > completely shitty compiler, gcc will do dead code elimination on it
> > > resulting in the same binary size.
> >
> > I've seen to much "shitty version" that does not do it correctly
> > so I prefer ot avoid the problem

Which compiler versions are that broken?  And are used regularly
to build rm9200 U-Boot code?  At normal optimization levels?
(We know that disabling optimization puts out all kinds of crap.)

This is really basic stuff:  "if (0) { dead } else { live }" and
the converse.  


> i'm pretty sure we're already relying on this behavior.  so you've got a 
> bigger problem that needs addressing (i.e. shit can that compiler) than what 
> David is proposing.

I know that when Linux started relying on that type of dead-code
elimination quite a few years back, nobody thought this was a
real issue.  And Linux is, on the whole, far more demanding of
compilers than U-Boot.




More information about the U-Boot mailing list