summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2015-03-18 10:57:24 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2015-05-06 21:17:51 +0800
commitc39479f4ab4d372b518957871e1f205a03e7c3d6 (patch)
treec0c112647737e717933be5f838021dae71ca7b6b /binutils-2.25/gold
parent97a8de179d86d83e05cab161566aad0e7a3281cc (diff)
downloadtoolchain_binutils-c39479f4ab4d372b518957871e1f205a03e7c3d6.tar.gz
toolchain_binutils-c39479f4ab4d372b518957871e1f205a03e7c3d6.tar.bz2
toolchain_binutils-c39479f4ab4d372b518957871e1f205a03e7c3d6.zip
Fix darwin build
1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support ended initializer list 2. wcsncasecmp doesn't exist in MacSDK10.6.x Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
Diffstat (limited to 'binutils-2.25/gold')
-rw-r--r--binutils-2.25/gold/gold-threads.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/binutils-2.25/gold/gold-threads.cc b/binutils-2.25/gold/gold-threads.cc
index ff5a8acc..45140e0b 100644
--- a/binutils-2.25/gold/gold-threads.cc
+++ b/binutils-2.25/gold/gold-threads.cc
@@ -284,9 +284,18 @@ Condvar::~Condvar()
class Once_initialize
{
public:
- Once_initialize()
- : once_(PTHREAD_ONCE_INIT)
- { }
+ Once_initialize()
+#if defined(__clang__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ : once_(PTHREAD_ONCE_INIT)
+ { }
+#else
+// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support
+// extended initializer list as above */
+ {
+ pthread_once_t once_2 = PTHREAD_ONCE_INIT;
+ once_ = once_2;
+ }
+#endif
// Return a pointer to the pthread_once_t variable.
pthread_once_t*