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: [RFC] Do we care about binary compatibility of code produced by cross-compilers?


Ian Lance Taylor wrote:

A simple rule of thumb: a libstdc++ built using a cross-compiler to
i686-pc-linux-gnu should be binary compatible with a libstdc++ built
by a native i686-pc-linux-gnu.

More strongly, ignoring debug information, what host you use to build a library should not result in any differences in the library. It should contain exactly the same functions, with exactly the same performance.


Obviously, this depends on compiler itself generating the same code whether cross- or native. But, assuming that, the requirement above should be met by the library.

Any test in the configuration of any runtime library which requires running a program on the target is bad, even if there is a cross-compilation fallback, since then whether you build cross or native results in different output, even with the same compilation options.

Every configuration decision should be either:

(a) determined by compile- and link-time tests, and/or
(b) hard-wired, based on the target triplet, and/or
(c) specified via a configuration option

You can always have a test in the testsuite that verifies a run-time property. That will give people a way to know that they've selected something incorrectly.

Thanks,

--
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]