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

Tom Rini trini at ti.com
Tue Sep 18 20:39:34 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

- -- 
Tom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQWL/mAAoJENk4IS6UOR1WwXQQAJXFmoGOjTxtuq1PMDYIEUSg
mGwZUgjTDy3wrzVl8xkzuSeRYtqL/vFbThHDVoAiWXcQ2/4Mrcunl3v3UW+QV2ye
KwESGqd05CIUEDxFqihOIKCR2KZHpUkt45Uf6SPOXfB4A0O7N9CuvyxPl2ZFHGxx
ePFwopmX9gL7xO3u1cjAtxtmiCS22ulztW3ROU3+NTsVKA3k4AXW617tjpsPmQzJ
L9N2LX49Z+UGDxh7YW/M4wcD50GlZFyIUY1COyhxeAQXmCXRMeDJdqxU1f3+SG1G
fnWsBPoVdIJEv8XBr+ABNd4DYDZCWsTA7uklvkt2NDh64Lp+Nge5dD92fZJfrKoc
NUWLhXN1U9ko9xbflxlBK94zkmtJfLfvtboK58frjv/H7MlSIuUzbgH4ixq/5ZOM
g5pKFQ2YynrZ0yrjqH8I/v50GsziT+LpAiQnE62Yt2EQMkNCIC1zDz9ikg3MhL63
sxiZPi0mpcbvao6f6l0JIllMkvEWBnM4fGQCWMGGOkjbCqvkSnBNt4BhgAK2ZXuC
kcLkdeOhszdWZxhfK+V0d5U+XQdIJoHdYyVC+6hAEd5iO4++gXgx+8feQV+ZQvSS
8iCdnobNp6XfM6agNOpkJto0+ROqEIyDSUzBAOb3+474fSWBjhhY7ievGxZiKikx
mhsHRYG6ziEdOt4bkQ5H
=m9GH
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list