summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig1
-rw-r--r--lib/tiny-printf.c16
2 files changed, 15 insertions, 2 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 2b97c2b0a4..02ca4058d3 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -14,6 +14,7 @@ config HAVE_PRIVATE_LIBGCC
config USE_PRIVATE_LIBGCC
bool "Use private libgcc"
depends on HAVE_PRIVATE_LIBGCC
+ default y if HAVE_PRIVATE_LIBGCC && ((ARM && !ARM64) || MIPS)
help
This option allows you to use the built-in libgcc implementation
of U-Boot instead of the one provided by the compiler.
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 4b70263df7..5ea2555280 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -147,8 +147,7 @@ static void putc_outstr(char ch)
*outstr++ = ch;
}
-/* Note that size is ignored */
-int snprintf(char *buf, size_t size, const char *fmt, ...)
+int sprintf(char *buf, const char *fmt, ...)
{
va_list va;
int ret;
@@ -161,3 +160,16 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
return ret;
}
+
+/* Note that size is ignored */
+int snprintf(char *buf, size_t size, const char *fmt, ...)
+{
+ va_list va;
+ int ret;
+
+ va_start(va, fmt);
+ ret = sprintf(buf, fmt, va);
+ va_end(va);
+
+ return ret;
+}
OpenPOWER on IntegriCloud