Fix undefined weak symbol reloc tests
[deliverable/binutils-gdb.git] / gold / gold-threads.cc
index c984dd04757acae1a11749a35812c236b6b13bb7..ebd9c1f2c4365d35184d69d359506daa1b80c689 100644 (file)
@@ -1,6 +1,6 @@
 // gold-threads.cc -- thread support for gold
 
-// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2006-2014 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -335,7 +335,10 @@ c_run_once(void)
 // Class Once.
 
 Once::Once()
-  : was_run_(false), was_run_lock_(0)
+  : was_run_(false)
+#if defined(ENABLE_THREADS) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
+    , was_run_lock_(0)
+#endif
 {
 #ifndef ENABLE_THREADS
   this->once_ = NULL;
@@ -404,7 +407,7 @@ Once::run_once(void* arg)
 
   err = pthread_mutex_unlock(&once_pointer_control);
   if (err != 0)
-    gold_fatal(_("pthread_mutex_unlock falied: %s"), strerror(err));
+    gold_fatal(_("pthread_mutex_unlock failed: %s"), strerror(err));
 
 #endif // defined(ENABLE_THREADS)
 }
This page took 0.024641 seconds and 4 git commands to generate.