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:
> Mark Mitchell wrote:
> 
>> If libstdc++ wants to support -march=i386, then you're going to need
>> multilibs.
>>
> Ah, then ok. Remember: we discussed that already with Ulrich Drepper
> participating some time, we all agree about that.
> 
> But, a couple of messages ago, you wrote to Joe that:
> 
>> In general, or for x86?  I don't see why we can't just change gcc to
>> default to -march=i486, and let that be that. 
> 
> I was trying to point out that a changed default doesn't go too far,
> only solves *part* the problems...

Yes.  Assuming you want to support both 386 and 486+ in libstdc++ (and I
think you should), we need (a) a feature macro (defined by the compiler,
or by libstdc++ at configure-time) to see if the builtins are available,
(b) libstdc++ code to test that feature macro.

Then, the compiler default is just a detail; if the user is building a
multilib with -march=i386, then you get the slow way; if they're
building with -march=i486, then you get the fast way.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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