This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: notes on current atomics config and usage


Paolo Carlini wrote:

It does allow for CXXFLAGS="-march=native" to D.T.R.T., as discussed earlier today.

I particularly like the idea that if one makes sure to have CXXFLAGS set when configure is run, then the atomic builtins are automatically picked by the configure test. This is a nice advantage (unrelated to making maintainance easier) wrt the hardcoded approach in place before. Makes perfect sense, indeed, and is already used outside libstdc++.

As a side note, I want to add that this possibility should be exploited only by careful people: if one configures and builds with CXXFLAGS="-march=i686" then _GLIBCXX_ATOMIC_BUILTINS is defined and afterwards, if the user code is not *always* compiled using the same settings the __sync_fetch_and_add calls remain unresolved. Maybe at some point we want to add a short note to the docs about this...


Certainly, if the default -march were i486 instead of i386 everything would be much more smooth...

Paolo.


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