The 22_locale/messages FAILs seen on Debian are due to the LANGUAGE
environment variable, which alters the behaviour of gettext(3) and
breaks our std::messages facet. gettext(3) says:

   If the LANGUAGE environment variable is set to a nonempty value,
   and the locale is not the "C" locale, the value of LANGUAGE is
   assumed to contain a colon separated list of locale names. The
   functions will attempt to look up a translation of msgid in each
   of the locales in turn. This is a GNU extension.

Tested powerpc64le-linux (Fedora 21) and x86_64-linux (Debian),
committed to trunk. I'll backport this to the branches too.

commit 87840848b3aaf31f4235db01d5605e05eb1317b9
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Mon Jun 1 09:54:12 2015 +0100

    	* testsuite/lib/libstdc++.exp (libstdc++_init): Unset LANGUAGE
    	environment variable.

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 7d8f282..d60062d 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -107,6 +107,10 @@ proc libstdc++_init { testfile } {
     setenv LC_ALL C
     setenv LANG C
 
+    # LANGUAGE changes the behavior of GNU gettext(3) and causes
+    # std::messages tests to fail.
+    array unset env LANGUAGE
+
     # Many hosts now default to a non-ASCII C locale, however, so
     # they can set a charset encoding here if they need.
     if { [ishost "*-*-cygwin*"] } {

Reply via email to