diff options
Diffstat (limited to 'tools/include/nolibc/string.h')
-rw-r--r-- | tools/include/nolibc/string.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/include/nolibc/string.h b/tools/include/nolibc/string.h index 0c2e06c7c477..6eca267ec6fa 100644 --- a/tools/include/nolibc/string.h +++ b/tools/include/nolibc/string.h @@ -49,6 +49,7 @@ void *_nolibc_memcpy_down(void *dst, const void *src, size_t len) return dst; } +#ifndef NOLIBC_ARCH_HAS_MEMMOVE /* might be ignored by the compiler without -ffreestanding, then found as * missing. */ @@ -72,13 +73,16 @@ void *memmove(void *dst, const void *src, size_t len) } return dst; } +#endif /* #ifndef NOLIBC_ARCH_HAS_MEMMOVE */ +#ifndef NOLIBC_ARCH_HAS_MEMCPY /* must be exported, as it's used by libgcc on ARM */ __attribute__((weak,unused,section(".text.nolibc_memcpy"))) void *memcpy(void *dst, const void *src, size_t len) { return _nolibc_memcpy_up(dst, src, len); } +#endif /* #ifndef NOLIBC_ARCH_HAS_MEMCPY */ /* might be ignored by the compiler without -ffreestanding, then found as * missing. |