From f94c4a49fecce77c7c217a445e4db0ee840dcdae Mon Sep 17 00:00:00 2001
|
From: Khem Raj <raj.khem@gmail.com>
|
Date: Fri, 21 May 2021 08:14:29 -0700
|
Subject: [PATCH] compiler-rt: Link scudo standalone with libatomic on mips
|
|
clang on mips generate atomic built-ins which should be provided by
|
libatomic
|
|
Upstream-Status: Pending
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
---
|
compiler-rt/lib/scudo/standalone/CMakeLists.txt | 4 ++++
|
1 file changed, 4 insertions(+)
|
|
diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
|
index 8c3708d3a45f..f6687db1a663 100644
|
--- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt
|
+++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
|
@@ -134,6 +134,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread SCUDO_LINK_FLAGS)
|
|
append_list_if(FUCHSIA zircon SCUDO_LINK_LIBS)
|
|
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "mips" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
|
+ list(APPEND SCUDO_LINK_LIBS atomic)
|
+endif()
|
+
|
if(COMPILER_RT_HAS_SCUDO_STANDALONE)
|
add_compiler_rt_object_libraries(RTScudoStandalone
|
ARCHS ${SCUDO_STANDALONE_SUPPORTED_ARCH}
|