[U-Boot] [PATCH] Fix Ymodem build when DEBUG and CONFIG_USE_TINY_PRINTF are selected

Attempting to build with both DEBUG and CONFIG_USE_TINY_PRINTF along with CONFIG_SPL_YMODEM_SUPPORT fails at link time:
common/built-in.o: In function `zm_dprintf': common/xyzModem.c:190: undefined reference to `vsprintf'
Disable Ymodem debug if we don't have full vsprintf support.
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com ---
common/xyzModem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/xyzModem.c b/common/xyzModem.c index a0c5dfe..8f830bb 100644 --- a/common/xyzModem.c +++ b/common/xyzModem.c @@ -172,7 +172,7 @@ parse_num (char *s, unsigned long *val, char **es, char *delim) }
-#ifdef DEBUG +#if defined(DEBUG) && !defined(CONFIG_USE_TINY_PRINTF) /* * Note: this debug setup works by storing the strings in a fixed buffer */

On Thu, May 3, 2018 at 6:45 AM, Alex Kiernan alex.kiernan@gmail.com wrote:
Attempting to build with both DEBUG and CONFIG_USE_TINY_PRINTF along with CONFIG_SPL_YMODEM_SUPPORT fails at link time:
common/built-in.o: In function `zm_dprintf': common/xyzModem.c:190: undefined reference to `vsprintf'
Disable Ymodem debug if we don't have full vsprintf support.
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com
Reviewed-by: Joe Hershberger joe.hershberger@ni.com

On Thu, May 03, 2018 at 11:45:08AM +0000, Alex Kiernan wrote:
Attempting to build with both DEBUG and CONFIG_USE_TINY_PRINTF along with CONFIG_SPL_YMODEM_SUPPORT fails at link time:
common/built-in.o: In function `zm_dprintf': common/xyzModem.c:190: undefined reference to `vsprintf'
Disable Ymodem debug if we don't have full vsprintf support.
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com Reviewed-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot/master, thanks!
participants (3)
-
Alex Kiernan
-
Joe Hershberger
-
Tom Rini