This is the mail archive of the gcc@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: Recent libstdc++ regression on i686-linux: abi/cxx_runtime_only_linkage.cc


Mark Mitchell:
Richard Henderson wrote:
H.J. Lu wrote:
Can we declare that Linux/ia32 generates i486 insn by default?

We the gcc team? I'm not sure. For now I'll say no.


We an individual linux distributor?  Certainly.
In fact I would be surprised if i586 wasn't a
decent minimum these days.

I agree. We the GCC team have to accept that some CPUs may not have the ability to do this. That might be old x86 CPUs; it might also be brand-new embedded CPUs.

Setting the default to -march=i486 will still let people who target i386 to use -march=i386.


The problem, from the point of view of a library such as boost::shared_ptr, is that there is no way to distinguish between user A, who just types g++ foo.cpp and expects to get a program that works well on a typical machine, and user B, who types g++ -march=i386 foo.cpp, with the explicit intent to run the result on a 386.

Since A users outnumber B users, boost::shared_ptr assumes A and uses 486 atomic instructions even though __i486__ is not defined.

Has the default been 486, I'd be able to recognize user B's intent and not use 486 instructions.

(Not that I've ever received a bug report about shared_ptr not working on 386.)


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