0028-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch 1.5 KB

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