[Lldb-commits] [PATCH] D11256: Fix build errors on older versions of gcc
Muhammad Omair Javaid
omair.javaid at linaro.org
Thu Jul 16 01:49:14 PDT 2015
omjavaid created this revision.
omjavaid added reviewers: tberghammer, clayborg.
omjavaid added a subscriber: lldb-commits.
Herald added a subscriber: aemerson.
This patch fixes some build errors while building with gcc 4.7.x or below.
Errors occured while building with arm-linux-gnueabi-gcc which is still using gcc 4.6 release.
http://reviews.llvm.org/D11256
Files:
source/Host/common/Host.cpp
source/Host/posix/PipePosix.cpp
source/Plugins/Process/Linux/NativeProcessLinux.h
source/Plugins/Process/Linux/NativeThreadLinux.cpp
Index: source/Plugins/Process/Linux/NativeThreadLinux.cpp
===================================================================
--- source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -31,7 +31,7 @@
#include <sys/syscall.h>
// 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;
Index: source/Plugins/Process/Linux/NativeProcessLinux.h
===================================================================
--- source/Plugins/Process/Linux/NativeProcessLinux.h
+++ source/Plugins/Process/Linux/NativeProcessLinux.h
@@ -195,7 +195,7 @@
const ProcessLaunchInfo &m_launch_info;
};
- typedef std::function<::pid_t(Error &)> InitialOperation;
+ typedef std::function< ::pid_t(Error &)> InitialOperation;
// ---------------------------------------------------------------------
// Private Instance Methods
Index: source/Host/posix/PipePosix.cpp
===================================================================
--- source/Host/posix/PipePosix.cpp
+++ 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 <functional>
#include <thread>
Index: source/Host/common/Host.cpp
===================================================================
--- source/Host/common/Host.cpp
+++ source/Host/common/Host.cpp
@@ -143,7 +143,11 @@
#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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11256.29874.patch
Type: text/x-patch
Size: 2091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150716/96e0141c/attachment.bin>
More information about the lldb-commits
mailing list