0025-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch 1.4 KB

12345678910111213141516171819202122232425262728
  1. From 4bbb4ab9d4cd3ff1424bed6346dd8e47cd4bcb24 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Wed, 19 May 2021 21:49:18 -0700
  4. Subject: [PATCH] compiler-rt: Link scudo with SANITIZER_CXX_ABI_LIBRARIES
  5. If SANITIZER_CXX_ABI_LIBRARIES is set then link scudo with it, this
  6. fixes build time errors like
  7. projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.armhf.dir/sanitizer_posix_libcdep.cpp.o: in function `__sanitizer::UnsetAlternateSignalStack()':
  8. | sanitizer_posix_libcdep.cpp:(.text+0x3d2): undefined reference to `__cxa_guard_acquire'
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. compiler-rt/lib/scudo/CMakeLists.txt | 1 +
  12. 1 file changed, 1 insertion(+)
  13. diff --git a/compiler-rt/lib/scudo/CMakeLists.txt b/compiler-rt/lib/scudo/CMakeLists.txt
  14. index 995e853e2a4d..25b79a8d17e8 100644
  15. --- a/compiler-rt/lib/scudo/CMakeLists.txt
  16. +++ b/compiler-rt/lib/scudo/CMakeLists.txt
  17. @@ -15,6 +15,7 @@ append_list_if(COMPILER_RT_HAS_LIBDL dl SCUDO_MINIMAL_DYNAMIC_LIBS)
  18. append_list_if(COMPILER_RT_HAS_LIBRT rt SCUDO_MINIMAL_DYNAMIC_LIBS)
  19. append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread SCUDO_MINIMAL_DYNAMIC_LIBS)
  20. append_list_if(COMPILER_RT_HAS_LIBLOG log SCUDO_MINIMAL_DYNAMIC_LIBS)
  21. +append_list_if(SANITIZER_CXX_ABI_LIBRARIES ${SANITIZER_CXX_ABI_LIBRARIES} SCUDO_MINIMAL_DYNAMIC_LIBS)
  22. append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer
  23. SCUDO_CFLAGS)