[RFC] Do we care about binary compatibility of code produced by cross-compilers?

Paolo Bonzini bonzini@gnu.org
Tue Sep 2 05:39:00 GMT 2008


Paolo Carlini wrote:
> Mark Mitchell wrote:
>> Paolo Carlini wrote:
>>> Shouldn't we run the test
>>> only once, at toplevel, propagate the information to the libraries, and,
>>> in case, have an infrastructure which allows the libraries to override
>>> the toplevel decision?     
>>
>> Yes, we should.
>   
> Ok. To clarify my personal position, I have no personal objections at
> all to moving the GCC_CHECK_TLS call a few lines above, among the checks
> performed unconditionally, for cross builds too. Just want to make sure
> there is consensus about that.

I don't have an opinion on this; however, I would like to point out that
the check is already centralized, though in config/.  The purpose of the
toplevel configure is *not* to have tests performed for all submodules
(BTW, this would be possible only for build/host checks; target checks
would have to wait for gcc to be built), but to find tools and to decide
what to build.

In this respect, checks for the prerequisites of GCC (like GMP or an Ada
compiler) are already borderline.  They are present there just because
you'd rather see the compilation fail at configure time, not at make
time, if the problem is that prerequisite packages are missing.

>> As per our earlier discussions, I think the libstdc++ "smart"-ness is a
>> mistake.  We have a good method for probing the C library: link-time
>> tests.  We don't use it for libstdc++ only because some people use a
>> build procedure in which you can't link C programs by the time you're
>> building the C++ library.  I suspect the other library maintainers just
>> didn't worry about that scenario.

I think we can provide a --disable-link-tests to preserve this behavior
for people that find it interesting.  We can have a deprecation period.

OTOH, I am also in favor of removing it at least by default.  Nowadays,
people build GCC with C-only support, then libc, then rebuild GCC.
Also, as a single data point, a friend just wrote me last week because
he was puzzled by the libstdc++ cross-compilation configuration and
couldn't get it to work. :-)

Paolo



More information about the Libstdc++ mailing list