shared_ptr 1.35.0 problem on SPARC

Joe Gottman reports in: http://svn.boost.org/trac/boost/ticket/1758 that 1.35.0 fails to build with gcc 3.4 on SPARC Solaris. The problem is that there is no way to autodetect whether the V9 instruction set has been selected in 32 bit mode, because GCC only defines __sparcv8 for compatibility reasons. Since most (all?) SPARCs where Boost runs are UltraSPARCs, which do support V9, we can fix this by making the V9 instruction set default. I see in gcc.jam the following lines: cpu-flags gcc OPTIONS : sparc : c3 : -mcpu=c3 : default ; cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 ; cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ; cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ; cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ; cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ; cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ; cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ; cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ; cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ; cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ; cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ; cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ; cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ; cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ; The default instruction set seems to be "c3", which results in -mcpu=c3. What is -mcpu=c3? It's not documented anywhere. Can we move the "default" to the v9 line?

The approach that I took was to re-build gcc so that it creates v9 executables by default (use --with-cpu=v9). Current versions of gcc already default to v9 so they work as-is. --ges
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov Sent: Wednesday, April 02, 2008 5:26 PM To: boost-devel Subject: [boost] shared_ptr 1.35.0 problem on SPARC
Joe Gottman reports in:
http://svn.boost.org/trac/boost/ticket/1758
that 1.35.0 fails to build with gcc 3.4 on SPARC Solaris. The problem is that there is no way to autodetect whether the V9 instruction set has been selected in 32 bit mode, because GCC only defines __sparcv8 for compatibility reasons.
Since most (all?) SPARCs where Boost runs are UltraSPARCs, which do support V9, we can fix this by making the V9 instruction set default.
<clip>
participants (2)
-
Peter Dimov
-
Schrader, Glenn