[U-Boot] [PATCH 62/71] serial: spl: Implement empty functions for SPL

Marek Vasut marex at denx.de
Tue Sep 18 20:54:10 CEST 2012


Dear Tom Rini,

> On 09/18/12 11:33, Marek Vasut wrote:
> > Dear Scott Wood,
> 
> [snip]
> 
> >> I think I got some wires crossed and was thinking about
> >> printf/puts. We want those to be optimized away at compile time
> >> (not pointed to a stub at link time) on an SPL that has no output
> >> support, but once that's done the low level serial functions
> >> shouldn't be referenced anymore, right?
> > 
> > But if you point them to stubs, that's OK. The compiler will GC
> > these useless stubs anyway. But wait, we're getting to LTO here,
> > right?
> > 
> > So the safest bet really is macro in serial.h ?
> 
> Due to the gcc bug I've mentioned before, yes.  Dummy functions will,
> I bet, keep the string constants around.  do {} while(0) will drop
> them out entirely.

Yea ... the GCC bug, what a crap :-(

Best regards,
Marek Vasut


More information about the U-Boot mailing list