]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR libstdc++/20448 (locale testsuite fails when GCC is configured with...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 9 Apr 2008 02:19:57 +0000 (02:19 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 9 Apr 2008 02:19:57 +0000 (02:19 +0000)
Backport:
2006-03-24  Mark Mitchell  <mark@codesourcery.com>
            Joseph S. Myers  <joseph@codesourcery.com>

PR libstdc++/20448
PR libstdc++/20451
* scripts/testsuite_flags.in (--cxxflags): Don't define LOCALEDIR.
* testsuite/lib/libstdc++.exp (libstdc++_init): Always define
LOCALEDIR to ".".
(v3-build_support): Build MO files.

From-SVN: r134123

libstdc++-v3/ChangeLog
libstdc++-v3/scripts/testsuite_flags.in
libstdc++-v3/testsuite/lib/libstdc++.exp

index 064de49be6bcba2c864ca0da9d95f218ca6fc904..7787c8b61641c52978d3647d54ead7177b7d6ab9 100644 (file)
@@ -1,3 +1,16 @@
+2008-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       Backport:
+       2006-03-24  Mark Mitchell  <mark@codesourcery.com>
+                   Joseph S. Myers  <joseph@codesourcery.com>
+
+       PR libstdc++/20448
+       PR libstdc++/20451
+       * scripts/testsuite_flags.in (--cxxflags): Don't define LOCALEDIR.
+       * testsuite/lib/libstdc++.exp (libstdc++_init): Always define
+       LOCALEDIR to ".".
+       (v3-build_support): Build MO files.
+
 2008-02-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * testsuite/27_io/fpos/14320-1.cc: Check for "long long" and
index 6f70002bcd46e37bcaa51c602352a3a1efdada79..8301375b332d8fbf3d1b415bb378d723421d7665 100755 (executable)
@@ -49,7 +49,7 @@ case ${query} in
     --cxxflags)
       CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
       CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0 
-                     @EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
+                     @EXTRA_CXX_FLAGS@ '
       echo ${CXXFLAGS_save} ${CXXFLAGS_config}
       ;;
     --cxxpchflags)
index bba33ded55dc287f9d9dd78ab27e14a169d14f0b..86be3a4d1ee7521a55c4a4af1ef079b553de3a51 100644 (file)
@@ -190,17 +190,12 @@ proc libstdc++_init { testfile } {
             set cxx [transform "g++"]
             set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0" 
             set includes "-I${srcdir}"
-           # Guess at the location of the installed locale files.
-           # (It would be nice if "gcc --print-file-name" could find
-           # message files, but it cannot.)
-           set absolute_cxx [which $cxx]
-           if { $absolute_cxx != "" } {
-               set localedir "[file dirname $absolute_cxx]/../share/locale"
-           }
-           set cxxflags "$cxxflags -DLOCALEDIR=\"$localedir\""
         }
     }
 
+    # Always use MO files built by this test harness.
+    set cxxflags "$cxxflags -DLOCALEDIR=\".\""
+
     # If a PCH file is available, use it.  We must delay performing
     # this check until $cxx and such have been initialized because we
     # perform a test compilation.  (Ideally, gcc --print-file-name would
@@ -390,6 +385,20 @@ proc v3-build_support { } {
        set v3-threads 1
     }
 
+    # Try to build the MO files that are used by some of the locale
+    # tests.  If we can't build them, that's OK; it just means that
+    # those tests will fail.
+    foreach lang [list "fr" "de"] {
+       catch {
+           file mkdir "$lang/LC_MESSAGES"
+           remote_exec "build" "msgfmt" "-o $lang/LC_MESSAGES/libstdc++.mo $srcdir/../po/$lang.po"
+           if [is_remote host] {
+               remote_exec "host" "mkdir" "-p $lang/LC_MESSAGES"
+               remote_download "host" "$lang/LC_MESSAGES/libstdc++.mo" "$lang/LC_MESSAGES/libstdc++.mo"
+           }
+       }
+    }
+
     # Build the support objects.
     set source_files \
        [list testsuite_abi.cc testsuite_allocator.cc testsuite_character.cc testsuite_hooks.cc ]