------- Comment #11 from bonzini at gnu dot org 2006-08-25 07:09 ------- Hmm, the test in GLIBCXX_ENABLE_ATOMIC_BUILTINS seems simple enough (testing for __sync_fetch_and_add support) that the compiler should provide it as a preprocessor symbol.
If you move cpu/generic/atomicity_{builtins,mutex}/atomicity.h to include/bits/atomicity_{builtins,mutex}.h, cpu/generic/atomicity.h can be simply: #include <bits/atomicity.h> #ifdef __ATOMIC_BUILTINS__ #include <bits/atomicity_builtins.h> #else #include <bits/atomicity_mutex.h> #endif Similarly, in all the cpu/*/atomicity.h files you would have #include <bits/atomicity.h> #ifdef __ATOMIC_BUILTINS__ #include <bits/atomicity_builtins.h> #else /* !__ATOMIC_BUILTINS__ */ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ... _GLIBCXX_END_NAMESPACE #endif /* !__ATOMIC_BUILTINS__ */ Does this make sense? If so, I'm happy to write a patch to define the symbol. -- bonzini at gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bonzini at gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28671