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

Marek Vasut marex at denx.de
Tue Sep 18 21:24:29 CEST 2012


Dear Scott Wood,

> On 09/18/2012 01:33:11 PM, Marek Vasut wrote:
> > Dear Scott Wood,
> > 
> > > On 09/18/2012 01:03:17 PM, Marek Vasut wrote:
> > > > I'd say the GCC must optimize it out anyway.
> > > 
> > > 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 ?
> 
> For printf/puts, we want something header-based.  For the serial
> functions it depends on whether we have call sites that do not get GCed.

I'm not removing printf() puts() etc. .. only the serial_ goo ... and see my 
other email, not much gain :(

> -Scott

Best regards,
Marek Vasut


More information about the U-Boot mailing list