libstdc++.exp (libstdc++_init): Define LOCALEDIR when testing an installed compiler.
authorMark Mitchell <mark@codesourcery.com>
Fri, 25 Mar 2005 23:24:57 +0000 (23:24 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 25 Mar 2005 23:24:57 +0000 (23:24 +0000)
* testsuite/lib/libstdc++.exp (libstdc++_init): Define LOCALEDIR
when testing an installed compiler.

From-SVN: r97070

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/lib/libstdc++.exp

index ee66ccb0cf1ded3312497f0bae91122e5d38af27..8424ae590159403b2bad785694e56a677dc4187b 100644 (file)
@@ -1,5 +1,8 @@
 2005-03-25  Mark Mitchell  <mark@codesourcery.com>
 
+       * testsuite/lib/libstdc++.exp (libstdc++_init): Define LOCALEDIR
+       when testing an installed compiler.
+       
        * testsuite/lib/libstdc++.exp (v3-build_support): Pass -w when
        compiling support objects.
 
index 9c9ace296378955ea9a284603e04f11981cd5b86..2f36c7faa55b40d1458281a397c2aad732d356e1 100644 (file)
@@ -183,6 +183,14 @@ 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\""
         }
     }