From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 18 Sep 2012 21:24:29 +0200 Subject: [U-Boot] [PATCH 62/71] serial: spl: Implement empty functions for SPL In-Reply-To: <1347996182.15284.12@snotra> References: <1347996182.15284.12@snotra> Message-ID: <201209182124.29878.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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