This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __sync_fetch_and_add_4 in libstdc++


2011/9/24 Ian Lance Taylor <iant@google.com>:
> "Maciej (Matchek) BliziÅski" <maciej@opencsw.org> writes:
>> The fix would probably involve compiling libstdc++ in such a way, that
>> __sync_fetch_and_add_4 would be generated. ÂDo you have an idea how to
>> achieve this?
>
> I recommend changing the target architecture to i686. ÂThe easy way to
> do this is to add --with-arch-32=i686 when you run configure. ÂYou don't
> have to use i686--you can use the minimum processor type that you expect
> to encounter.

I have an update on the issue.  I raised this topic at the OpenCSW
summit last week in Kiel[1].  The need to compile for sparcv8 and i386
comes from OpenCSW supporting Solaris 9.  However, Oracle is soon
dropping support for Solaris 9, and we'll follow by changing the
support level from full to best effort.

On Solaris 10, the situation is better, because the minimal supported
architectures are Intel without the f00f bug and sparcv8+.  The lowest
Intel architecture without the f00f bug is pentium pro.  The
conclusion was that we raise the default architecture levels for
Solaris 10 to sparcv8+ and pentium pro.  When we deprecate Solaris 9,
we will no longer have the requirement of compiling for i386 and
sparcv8.

I also noticed that the __sync_fetch_and_add_4 problem which used to
occur when compiling for sparcv8 with gcc-4.3.3, is gone in gcc-4.6.1.
According to Joerg, sparcv8 does have the necessary opcodes, so the
change could be attributed to improved sparc support in gcc-4.6.x.

Ian and Jonathan, thanks for the help!

Maciej

[1] Meeting minutes from Sunday: http://t.co/AZeElR1L


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]