https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98861
--- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> --- And memcpy must be provided as documented in the GCC documentation: Most of the compiler support routines used by GCC are present in @file{libgcc}, but there are a few exceptions. GCC requires the freestanding environment provide @code{memcpy}, @code{memmove}, @code{memset} and @code{memcmp}. Finally, if @code{__builtin_trap} is used, and the target does not implement the @code{trap} pattern, then GCC emits a call to @code{abort}.