From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 18 Sep 2012 14:23:02 -0500 Subject: [U-Boot] [PATCH 62/71] serial: spl: Implement empty functions for SPL In-Reply-To: <201209182033.11689.marex@denx.de> (from marex@denx.de on Tue Sep 18 13:33:11 2012) Message-ID: <1347996182.15284.12@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. -Scott