This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] Do we care about binary compatibility of code produced by cross-compilers?
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 11 Aug 2008 18:33:24 -0700
- Subject: Re: [RFC] Do we care about binary compatibility of code produced by cross-compilers?
- References: <48A05898.9000705@oracle.com> <m37iane6sw.fsf@google.com>
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