Boost logo

Boost :

From: Glenn Schrader (gschrad_at_[hidden])
Date: 2006-12-21 00:59:31

Peter Dimov wrote:
> Glenn Schrader wrote:
>> The cas instruction is supported on the sparc v8plus and v9. Support
>> for
>> just sparc v8 is inadequate. In that case you need to use the swap
>> instruction and some looping to do something similar to a cas. Another
>> wrinkle is that just removing the defined(__sparcv8) from the above
>> condition doesn't quite do the right thing with gcc. From what I can
>> tell gcc is setting __sparcv8 even if -mcpu=v9 is specified. I have a
>> v9 processor but I'm running 32 bit solaris so could gcc be basing the
>> __sparcv8/v9 defines on the OS rather than the cpu type? The biggest
>> difference between the v8 and v9 cpus is 64bit support.
> The problem is that some versions of GCC are setting the v9 macro only in
> 64-bit builds (probably because of existing code that makes this assumption)
> and I'm not sure what we can do about that.

That is consistent with the behavior that I'm seeing with gcc 4.1.1.
> Is __sparcv8plus defined for
> you? It's the right macro in principle, but I suspect that it's not being
> used because it doesn't work.
The only macro that gets defined is __sparcv8. I also haven't found a
direct way to tell gcc that the cpu is a v8plus. For instance
-mcpu=v8plus doesn't work.

If GCC itself is currently broken in this regard and we'll have to live
with it (for now) then there should be a note in the build procedure on
how to do a successful build.

Thanks much,


Boost list run by bdawes at, gregod at, cpdaniel at, john at