On 8 December 2015 at 12:38, Simon Glass <s...@chromium.org> wrote: > Hi Scott, > > On 8 December 2015 at 12:36, Scott Wood <scottw...@freescale.com> wrote: >> On Tue, 2015-12-08 at 12:34 -0700, Simon Glass wrote: >>> Hi Sjoerd, >>> >>> On 8 December 2015 at 00:27, Sjoerd Simons >>> <sjoerd.sim...@collabora.co.uk> wrote: >>> > >>> > On Mon, 2015-12-07 at 17:39 -0700, Simon Glass wrote: >>> > > > diff --git a/lib/Makefile b/lib/Makefile >>> > > > index 1f1ff6f..ae84833 100644 >>> > > > --- a/lib/Makefile >>> > > > +++ b/lib/Makefile >>> > > > @@ -85,13 +85,13 @@ obj-$(CONFIG_LIB_RAND) += rand.o >>> > > > ifdef CONFIG_SPL_BUILD >>> > > > # SPL U-Boot may use full-printf, tiny-printf or none at all >>> > > > ifdef CONFIG_USE_TINY_PRINTF >>> > > > -obj-$(CONFIG_SPL_SERIAL_SUPPORT) += tiny-printf.o >>> > > > +obj-$(CONFIG_SPL_SERIAL_SUPPORT) += tiny-printf.o panic.o >>> > > > else >>> > > > -obj-$(CONFIG_SPL_SERIAL_SUPPORT) += vsprintf.o >>> > > > +obj-$(CONFIG_SPL_SERIAL_SUPPORT) += vsprintf.o panic.o >>> > > > endif >>> > > > else >>> > > > # Main U-Boot always uses the full printf support >>> > > > -obj-y += vsprintf.o >>> > > > +obj-y += vsprintf.o panic.o >>> > > > endif >>> > > >>> > > Why not just add this outside all the ifdef stuff: >>> > > >>> > > obj-y += panic.o >>> > >>> > Just keeping the old behaviour, that code was not build for SPL builds >>> > without serial support before. Do you see a benefit of just always >>> > building it ? >>> >>> I cannot see a case where you don't build it: >>> >>> ifdef CONFIG_SPL_BUILD >>> # SPL U-Boot may use full-printf, tiny-printf or none at all >>> ifdef CONFIG_USE_TINY_PRINTF >>> obj-$(CONFIG_SPL_SERIAL_SUPPORT) += tiny-printf.o panic.o strto.o >>> else >>> obj-$(CONFIG_SPL_SERIAL_SUPPORT) += vsprintf.o panic.o strto.o >>> endif >>> else >>> # Main U-Boot always uses the full printf support >>> obj-y += vsprintf.o panic.o strto.o >>> endif >>> >>> >>> Every case has panic.o and strto.o. What am I missing? >> >> The dependency on CONFIG_SPL_SERIAL_SUPPORT. > > OK, so how about this: > >>> ifdef CONFIG_SPL_BUILD >>> # SPL U-Boot may use full-printf, tiny-printf or none at all > > obj-$(CONFIG_SPL_SERIAL_SUPPORT) += panic.o strto.o > >>> ifdef CONFIG_USE_TINY_PRINTF > obj-$(CONFIG_SPL_SERIAL_SUPPORT) += tiny-printf.o >>> else > obj-$(CONFIG_SPL_SERIAL_SUPPORT) += vsprintf.o >>> endif >>> else >>> # Main U-Boot always uses the full printf support >>> obj-y += vsprintf.o panic.o strto.o >>> endif
It's just a nit so I'm going to leave it as is for now. Applied to u-boot-rockchip, thanks! _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot