0003-wrap_memcpy.cc-add-GPR_DISABLE_WRAPPED_MEMCPY.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. From be030314805137cd63b46ea6eaa702b608669910 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 2 Jun 2019 17:45:47 +0200
  4. Subject: [PATCH] wrap_memcpy.cc: add GPR_DISABLE_WRAPPED_MEMCPY
  5. Add GPR_DISABLE_WRAPPED_MEMCPY to allow the user to disable wrapped
  6. memcpy. This will fix build on x86_64 on musl/uclibc without changing
  7. the cpu behavior.
  8. Fixes:
  9. - http://autobuild.buildroot.org/results/20d6f2489a4e291a53bd514da66105eb607e1014
  10. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  11. [Upstream status: https://github.com/grpc/grpc/pull/19207]
  12. ---
  13. src/core/lib/gpr/wrap_memcpy.cc | 2 +-
  14. 1 file changed, 1 insertion(+), 1 deletion(-)
  15. diff --git a/src/core/lib/gpr/wrap_memcpy.cc b/src/core/lib/gpr/wrap_memcpy.cc
  16. index 9b8608e056..38b76acf95 100644
  17. --- a/src/core/lib/gpr/wrap_memcpy.cc
  18. +++ b/src/core/lib/gpr/wrap_memcpy.cc
  19. @@ -28,7 +28,7 @@
  20. extern "C" {
  21. #ifdef __linux__
  22. -#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT)
  23. +#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) && !defined(GPR_DISABLE_WRAPPED_MEMCPY)
  24. __asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
  25. void* __wrap_memcpy(void* destination, const void* source, size_t num) {
  26. return memcpy(destination, source, num);
  27. --
  28. 2.20.1