Default libstdc++ --enable-clocale configuration patch

Jonathan Wakely jwakely.gcc@gmail.com
Wed May 19 02:42:00 GMT 2010


On 19 May 2010 01:16, Joseph S. Myers <joseph@codesourcery.com> wrote:
> libstdc++-v3 has a configure test to determine whether to default to
> --enable-clocale=gnu or --enable-clocale=generic on GNU/Linux
> systems.  This does an execution-time test for bugs in early glibc 2.2
> releases.
>
> glibc 2.2 is now very old and those bugs are unlikely to be
> encountered when building GCC.  The test has more practical problems
> on systems with more recent glibc where the bugs are not present:
>
> * It relies on the presence of a de_DE locale and so may cause the
>  "generic" model to be used unnecessarily when that locale is not
>  installed.
>
> * The cross-compilation fallback is to use the "generic" model.
>
> Using the "generic" model is ABI-incompatible with the "gnu" model
> that is the expected default on GNU/Linux (as indicated by the
> checked-in ABI baselines, for example), and making it easy for an
> ABI-incompatible library to be built unnecessarily without
> specifically requesting it is a bad idea.
>
> Bugs in glibc 2.2 seem of little relevance to normal modern GCC
> configuration.  So this patch removes the AC_TRY_RUN test, making the
> compile-time test stricter (glibc 2.3 or later, disallowing uClibc
> which also defines __GLIBC__) to ensure the "gnu" model won't be used
> on known-buggy libc versions.
>
> The XML documentation is updated in this patch.  configure would be
> regenerated in a commit of this patch, but I don't know how to
> regenerate the HTML documentation generated from the XML (I couldn't
> find relevant makefile rules to rebuild those checked-in files).

"make doc-html" regenerates them, but it's not a problem if you leave
it for someone else to do next time the xml is updated.

Any chance you could update this FAQ too?
http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.linux_glibc
If not, I'll do so.

> prerequisites.xml looks more generally very out-of-date, talking about
> GCC 3.x (surely current libstdc++-v3 can't be built with anything
> other than the GCC version it comes with or at least a very recent
> GCC).

That's right.  There are lots of outdated bits like that in the docs,
I fix them as I find them and find time.  Feel free to open a bug and
assign it to me.



More information about the Gcc-patches mailing list