Move some cruft from the build system to the source.
It's more intention-revealing this way round anyway...
Test: treehugger
Change-Id: I561d8ac3003fa6b7f19fcf7110a6646c69bdd936
diff --git a/libc/bionic/fortify.cpp b/libc/bionic/fortify.cpp
index 4317a56..73cf973 100644
--- a/libc/bionic/fortify.cpp
+++ b/libc/bionic/fortify.cpp
@@ -489,8 +489,9 @@
return strcpy(dst, src);
}
-#if !defined(HAVE_ASSEMBLER___MEMCPY_CHK)
+#if !defined(__arm__) && !defined(__aarch64__)
// Runtime implementation of __memcpy_chk (used directly by compiler, not in headers).
+// arm32 and arm64 have assembler implementations, and don't need this C fallback.
extern "C" void* __memcpy_chk(void* dst, const void* src, size_t count, size_t dst_len) {
__check_count("memcpy", "count", count);
__check_buffer_access("memcpy", "write into", count, dst_len);