From d6a3b5786ad5c454c79079e1e184a27b684a22c3 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 14 Feb 2019 18:36:52 +0000 Subject: [PATCH] Support: use internal `call_once` on PPC64le Always use the internal `call_once` for PPC64le. This is needed to support the Swift toolchain on PPC64le. Patch by Sarvesh Tamba! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354045 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Threading.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/llvm/Support/Threading.h b/include/llvm/Support/Threading.h index 23b115f0b47..953c60f91dd 100644 --- a/include/llvm/Support/Threading.h +++ b/include/llvm/Support/Threading.h @@ -32,6 +32,9 @@ // implementations like libstdc++ are known to have problems on NetBSD, // OpenBSD and PowerPC. #define LLVM_THREADING_USE_STD_CALL_ONCE 1 +#elif defined(LLVM_ON_UNIX) && \ + ((defined(__ppc__) || defined(__PPC__)) && defined(__LITTLE_ENDIAN__)) +#define LLVM_THREADING_USE_STD_CALL_ONCE 1 #else #define LLVM_THREADING_USE_STD_CALL_ONCE 0 #endif -- 2.40.0