From 2040548fcb7d5389e55634e3944bcfeba9afdcff Mon Sep 17 00:00:00 2001 From: Omair Javaid Date: Sun, 9 Aug 2015 19:04:41 +0000 Subject: [PATCH] Fix for build errors on arm-linux-gnueabi-gcc http://reviews.llvm.org/D11256 llvm-svn: 244419 --- lldb/source/Host/common/Host.cpp | 4 ++++ lldb/source/Host/posix/PipePosix.cpp | 4 ++++ lldb/source/Plugins/Process/Linux/NativeProcessLinux.h | 2 +- lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 94c78a0..c2f07ec 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -143,7 +143,11 @@ private: #endif // __linux__ #ifdef __linux__ +#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)) +static __thread volatile sig_atomic_t g_usr1_called; +#else static thread_local volatile sig_atomic_t g_usr1_called; +#endif static void SigUsr1Handler (int) diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index 0ed319f..8fdf97f 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -13,6 +13,10 @@ #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" +#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)) +#define _GLIBCXX_USE_NANOSLEEP +#endif + #include #include diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h index 1632f7f..4ab2084 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h @@ -171,7 +171,7 @@ namespace process_linux { const ProcessLaunchInfo &m_launch_info; }; - typedef std::function<::pid_t(Error &)> InitialOperation; + typedef std::function< ::pid_t(Error &)> InitialOperation; // --------------------------------------------------------------------- // Private Instance Methods diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp index ccf4cce..481127a 100644 --- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -31,7 +31,7 @@ #include // Try to define a macro to encapsulate the tgkill syscall #define tgkill(pid, tid, sig) \ - syscall(SYS_tgkill, static_cast<::pid_t>(pid), static_cast<::pid_t>(tid), sig) + syscall(SYS_tgkill, static_cast< ::pid_t>(pid), static_cast< ::pid_t>(tid), sig) using namespace lldb; using namespace lldb_private; -- 2.7.4