0026-compiler-rt-Link-scudo-standalone-with-libatomic-on-.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. From 0806d2c4a56116b99413c506e8ff5ebe11bf270f Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Fri, 21 May 2021 08:14:29 -0700
  4. Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips
  5. clang on mips generate atomic built-ins which should be provided by
  6. libatomic
  7. Upstream-Status: Pending
  8. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  9. ---
  10. compiler-rt/lib/scudo/standalone/CMakeLists.txt | 4 ++++
  11. 1 file changed, 4 insertions(+)
  12. diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
  13. index 739f131bdefd..5862545b842b 100644
  14. --- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt
  15. +++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
  16. @@ -137,6 +137,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS)
  17. append_list_if(FUCHSIA zircon SCUDO_LINK_LIBS)
  18. +if (CMAKE_SYSTEM_PROCESSOR MATCHES "mips" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
  19. + list(APPEND SCUDO_LINK_LIBS atomic)
  20. +endif()
  21. +
  22. if(COMPILER_RT_HAS_SCUDO_STANDALONE)
  23. add_compiler_rt_object_libraries(RTScudoStandalone
  24. ARCHS ${SCUDO_STANDALONE_SUPPORTED_ARCH}