diff options
author | Roland McGrath <roland@gnu.org> | 2013-10-11 21:02:42 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2013-10-11 21:02:42 +0000 |
commit | a78e87083f5374ec58a2601472ede61bb8a7c968 (patch) | |
tree | d7a01146d08553ed3c13531c64f6a0fb79a1d733 /gold/gold-threads.cc | |
parent | e3db3cf75948e491fd7c03415b5612a1e2fa88cd (diff) | |
download | binutils-redhat-a78e87083f5374ec58a2601472ede61bb8a7c968.tar.gz |
gold/
* gold-threads.h (Once): Conditionalize member was_run_lock_ on
[ENABLE_THREADS && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4], matching
its only use.
* gold-threads.cc (Once::Once): Likewise conditionalize initializer.
Diffstat (limited to 'gold/gold-threads.cc')
-rw-r--r-- | gold/gold-threads.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gold/gold-threads.cc b/gold/gold-threads.cc index 38a1e1600d..2cb293e372 100644 --- a/gold/gold-threads.cc +++ b/gold/gold-threads.cc @@ -1,6 +1,6 @@ // gold-threads.cc -- thread support for gold -// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009, 2010, 2013 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; |