This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3] mutex vs. cstdatomic
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Date: Fri, 12 Dec 2008 23:27:38 -0800
- Subject: [v3] mutex vs. cstdatomic
There appears to be an include ordering issue on darwin:
No joy:
#include "gstdint.h"
#include <cstdatomic>
#include <mutex>
OK:
#include "gstdint.h"
#include <mutex>
#include <cstdatomic>
Adjusting this allows bootstrap on darwin again. Sorry about this: I
thought I had tested this platform specifically before check-in, but
apparently not with the correct sources.
tested x86_64/linux
tested darwin9.5.0/x86
-benjamin
2008-12-12 Benjamin Kosnik <bkoz@redhat.com>
* src/Makefile.am: Remove -x c++ for atomic build rules.
* src/Makefile.in: Regenerate.
* src/atomic.cc: Move mutex include before cstdatomic.
Index: src/atomic.cc
===================================================================
--- src/atomic.cc (revision 142737)
+++ src/atomic.cc (working copy)
@@ -29,8 +29,8 @@
// the GNU General Public License.
#include "gstdint.h"
+#include <mutex>
#include <cstdatomic>
-#include <mutex>
#define LOGSIZE 4
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revision 142737)
+++ src/Makefile.am (working copy)
@@ -274,9 +274,9 @@
$(CXXCOMPILE) -std=gnu++0x -c $<
atomic.lo: atomic.cc
- $(LTCXXCOMPILE) -x c++ -std=gnu++0x -c $<
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
atomic.o: atomic.cc
- $(CXXCOMPILE) -x c++ -std=gnu++0x -c $<
+ $(CXXCOMPILE) -std=gnu++0x -c $<
string-inst.lo: string-inst.cc
$(LTCXXCOMPILE) -std=gnu++0x -c $<