This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: _GLIBCXX_PROFILE on non-Linux?
Paolo Carlini <paolo.carlini@oracle.com> writes:
> On 01/19/2010 04:20 PM, Ian Lance Taylor wrote:
>> You can diagnose it at compile time via something like
>>
>> #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
>>
> By the way, Ian, I didn't follow some rather recent developments in
> libgcc, I suspect that on some targets even if
> __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is undefined, libgcc may actually
> provide the builtins, thus such kind of compile-time check would be a
> little too conservative, in general. Do you know anything about that?
I know that that was the original theory but I wasn't aware that it
was ever actually implemented. Looking now, I see some support in
libgcc for targets to provide the sync builtins. It looks like that
is being used by one target: MIPS running in MIPS16 mode.
So, you're right, the compile time check is a little too conservative
at present. But it could be easily fixed by arranging for the mips16
target to define the appropriate macros. So I don't see that as a
barrier to a patch along these lines.
Ian