diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-05-19 23:35:43 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2016-05-20 00:15:15 -0700 |
commit | 7364ca41b93841437667c84bb66c15fcb39763d9 (patch) | |
tree | 5f0f6ae79156109f66d817b53a14d7bbc252b5f5 /recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch | |
parent | ed0cc9804381763e6c0baebcb2a5793645531a83 (diff) | |
download | meta-clang-7364ca41b93841437667c84bb66c15fcb39763d9.tar.gz |
clang: Switch to master (3.9) branch
Drop upstreamed patches
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch')
-rw-r--r-- | recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch b/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch index f66de8f..e9eb4d2 100644 --- a/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch +++ b/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From 21ddd574f6e9b321614d39a7765f1ad98aa09f54 Mon Sep 17 00:00:00 2001 | 1 | From a97e50970942df6bf0f3f2fda5ba44e10ef63713 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 15 Mar 2016 04:56:27 +0000 | 3 | Date: Thu, 19 May 2016 23:22:52 -0700 |
4 | Subject: [PATCH] use constexpr when using glibc | 4 | Subject: [PATCH] use constexpr when using glibc |
5 | 5 | ||
6 | POSIX does not permit using PTHREAD_COND_INITIALIZER except for static | 6 | POSIX does not permit using PTHREAD_COND_INITIALIZER except for static |
@@ -12,45 +12,37 @@ code is invalid | |||
12 | 12 | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
14 | --- | 14 | --- |
15 | include/__mutex_base | 11 ++++++++--- | 15 | include/__mutex_base | 10 ++++++++-- |
16 | 1 file changed, 8 insertions(+), 3 deletions(-) | 16 | 1 file changed, 8 insertions(+), 2 deletions(-) |
17 | 17 | ||
18 | diff --git a/include/__mutex_base b/include/__mutex_base | 18 | diff --git a/include/__mutex_base b/include/__mutex_base |
19 | index b019b47..10ad9f2 100644 | 19 | index 32536a6..58430c7 100644 |
20 | --- a/include/__mutex_base | 20 | --- a/include/__mutex_base |
21 | +++ b/include/__mutex_base | 21 | +++ b/include/__mutex_base |
22 | @@ -33,7 +33,10 @@ class _LIBCPP_TYPE_VIS mutex | 22 | @@ -39,7 +39,10 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mut |
23 | public: | 23 | public: |
24 | _LIBCPP_INLINE_VISIBILITY | 24 | _LIBCPP_INLINE_VISIBILITY |
25 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR | 25 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR |
26 | - constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} | 26 | - constexpr mutex() _NOEXCEPT : __m_(_LIBCPP_MUTEX_INITIALIZER) {} |
27 | +#ifdef __GLIBC__ | 27 | +#ifdef __GLIBC__ |
28 | + constexpr | 28 | + constexpr |
29 | +#endif | 29 | +#endif |
30 | + mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} | 30 | + mutex() _NOEXCEPT : __m_(_LIBCPP_MUTEX_INITIALIZER) {} |
31 | #else | 31 | #else |
32 | mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} | 32 | mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;} |
33 | #endif | 33 | #endif |
34 | @@ -63,7 +66,6 @@ extern const try_to_lock_t try_to_lock; | 34 | @@ -278,7 +281,10 @@ class _LIBCPP_TYPE_VIS condition_variable |
35 | extern const adopt_lock_t adopt_lock; | ||
36 | |||
37 | #else | ||
38 | - | ||
39 | constexpr defer_lock_t defer_lock = defer_lock_t(); | ||
40 | constexpr try_to_lock_t try_to_lock = try_to_lock_t(); | ||
41 | constexpr adopt_lock_t adopt_lock = adopt_lock_t(); | ||
42 | @@ -272,7 +274,10 @@ class _LIBCPP_TYPE_VIS condition_variable | ||
43 | public: | 35 | public: |
44 | _LIBCPP_INLINE_VISIBILITY | 36 | _LIBCPP_INLINE_VISIBILITY |
45 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR | 37 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR |
46 | - constexpr condition_variable() : __cv_(PTHREAD_COND_INITIALIZER) {} | 38 | - constexpr condition_variable() : __cv_(_LIBCPP_CONDVAR_INITIALIZER) {} |
47 | +#ifdef __GLIBC__ | 39 | +#ifdef __GLIBC__ |
48 | + constexpr | 40 | + constexpr |
49 | +#endif | 41 | +#endif |
50 | + condition_variable() : __cv_(PTHREAD_COND_INITIALIZER) {} | 42 | + condition_variable() : __cv_(_LIBCPP_CONDVAR_INITIALIZER) {} |
51 | #else | 43 | #else |
52 | condition_variable() {__cv_ = (pthread_cond_t)PTHREAD_COND_INITIALIZER;} | 44 | condition_variable() {__cv_ = (__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;} |
53 | #endif | 45 | #endif |
54 | -- | 46 | -- |
55 | 1.9.1 | 47 | 2.8.2 |
56 | 48 | ||