OSDN Git Service

* lib/libstdc++.exp: Use global variable ld_library_path (not local)
[pf3gnuchains/gcc-fork.git] / libstdc++ / testsuite / lib / libstdc++.exp
index f9bcdf4..3333dda 100644 (file)
@@ -56,6 +56,7 @@ proc test_libstdc++ { options srcfile compile_args inpfile resultfile exec_args
     global LIBSTDCPP
     global srcdir subdir objdir
     global TOOL_OPTIONS
+    global ld_library_path
 
     if [info exists LIBSTDCPP] {
        set libstdcpp $LIBSTDCPP;
@@ -81,15 +82,12 @@ proc test_libstdc++ { options srcfile compile_args inpfile resultfile exec_args
     regsub -all -- "-L" $libstdcpp "" ld_library_path
 
     # Then remove any -lstdc++ argument.
-    regsub -all -- " -lstdc.*" $ld_library_path "" ld_library_path
+    regsub -all -- " -lstdc.." $ld_library_path "" ld_library_path
 
     # That's enough to make things work for the normal case.
     # If we wanted to handle an arbitrary value of libstdcpp,
     # then we'd have to do a lot more work.
 
-    # Set variables the dynamic linker looks at.
-    setenv LD_LIBRARY_PATH $ld_library_path
-    setenv SHLIB_PATH $ld_library_path
     if { $compile_args != "" } {
        lappend args "additional_flags=$compile_args"
     }