summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2017-09-09 06:47:43 -0400
committerTom Rini <trini@konsulko.com>2017-09-12 17:58:01 -0400
commit7e3e20560784b048ff19e90cd36b6680626b1ab3 (patch)
treeca0ea3091a876d4bad810bc031c51ab3a79a9bdf /examples
parent22ada0c8e6d50281af72176eecdfc356c794639c (diff)
downloadu-boot-7e3e20560784b048ff19e90cd36b6680626b1ab3.tar.gz
examples: add fallback memcpy
Solves build issue: Building current source for 134 boards (12 threads, 1 job per thread) arm: + lsxhl +examples/api/vsprintf.o: In function `string16': +lib/vsprintf.c:278: undefined reference to `memcpy' +examples/api/uuid.o: In function `uuid_bin_to_str': +lib/uuid.c:197: undefined reference to `memcpy' +lib/uuid.c:199: undefined reference to `memcpy' +make[3]: *** [examples/api/demo] Error 1 +make[2]: *** [examples/api] Error 2 +make[1]: *** [examples] Error 2 +make: *** [sub-make] Error 2 133 0 1 /134 sheevaplug Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/api/glue.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/api/glue.c b/examples/api/glue.c
index 8aabf32c89..575c1e55f3 100644
--- a/examples/api/glue.c
+++ b/examples/api/glue.c
@@ -416,3 +416,15 @@ void ub_display_clear(void)
{
syscall(API_DISPLAY_CLEAR, NULL);
}
+
+__weak void *memcpy(void *dest, const void *src, size_t size)
+{
+ unsigned char *dptr = dest;
+ const unsigned char *ptr = src;
+ const unsigned char *end = src + size;
+
+ while (ptr < end)
+ *dptr++ = *ptr++;
+
+ return dest;
+}