Boost logo

Boost :

Subject: Re: [boost] [atomic] unconditional cmpxchg8b support
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-10-23 18:50:36


On 23/10/12 23:22, Peter Dimov wrote:
> Steven Watanabe wrote:
>> Seriously, if the compiler is set to compile for
>> an architecture that doesn't support cmpxchg8b,
>> then Boost.Atomic should not generate this instruction.
>
> It's very, very rare for a user to willingly target 386/486 (these
> processors are all but extinct, not to mention that modern Windows
> versions simply don't run on them.)
>
> A GCC target of i386 in practice simply means that a target hasn't been
> set, not that the user explicitly wanted to target i386. Nobody wants to
> target i386.

Three possible solutions:
  - educate your users
  - recommend that your users use a 64-bit distribution where the
defaults will be better
  - make your build system do what you need it to do transparently.

If in practice the program you're making should run on the same machine
as the one you're building it on, you may for example detect what the
machine building it supports and enable the appropriate compilation flags.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk