aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-03-07 21:27:51 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-03-07 21:27:51 +0800
commitfe1a20404b19d5dd0cd0988d080cff8a455c2a76 (patch)
treeae89a88a696462ead95f5ac6c6c622d4806f885f /gcc-4.6
parent1ed1c0506a4b26ebffb0e52e068c25cef2f4dfad (diff)
downloadtoolchain_gcc-fe1a20404b19d5dd0cd0988d080cff8a455c2a76.zip
toolchain_gcc-fe1a20404b19d5dd0cd0988d080cff8a455c2a76.tar.gz
toolchain_gcc-fe1a20404b19d5dd0cd0988d080cff8a455c2a76.tar.bz2
GNU libstdc++ --enable-linux-futex
Change-Id: Ib97053768252b05decd513825ae45757b220f7d4
Diffstat (limited to 'gcc-4.6')
-rwxr-xr-xgcc-4.6/libstdc++-v3/configure12
-rw-r--r--gcc-4.6/libstdc++-v3/libsupc++/guard.cc5
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.6/libstdc++-v3/configure b/gcc-4.6/libstdc++-v3/configure
index 9aedd4f..73dcdb5 100755
--- a/gcc-4.6/libstdc++-v3/configure
+++ b/gcc-4.6/libstdc++-v3/configure
@@ -63546,6 +63546,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;
+#if !defined(SYS_gettid)
+#define SYS_gettid __NR_gettid
+#endif
+#if !defined(SYS_futex)
+#define SYS_futex __NR_futex
+#endif
int
main ()
{
@@ -63604,6 +63610,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;
+#if !defined(SYS_gettid)
+#define SYS_gettid __NR_gettid
+#endif
+#if !defined(SYS_futex)
+#define SYS_futex __NR_futex
+#endif
int
main ()
{
diff --git a/gcc-4.6/libstdc++-v3/libsupc++/guard.cc b/gcc-4.6/libstdc++-v3/libsupc++/guard.cc
index 6e3d415..4d9eba7 100644
--- a/gcc-4.6/libstdc++-v3/libsupc++/guard.cc
+++ b/gcc-4.6/libstdc++-v3/libsupc++/guard.cc
@@ -34,7 +34,12 @@
#if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
&& defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
# include <climits>
+#if defined(__ANDROID__)
+# include <sys/syscall.h>
+# define SYS_futex __NR_futex
+#else
# include <syscall.h>
+#endif
# define _GLIBCXX_USE_FUTEX
# define _GLIBCXX_FUTEX_WAIT 0
# define _GLIBCXX_FUTEX_WAKE 1