libgomp-dg.exp (libgomp_init): Compute multilib-related part of LD_LIBRARY_PATH manually.
authorEric Botcazou <ebotcazou@libertysurf.fr>
Tue, 7 Feb 2006 21:57:38 +0000 (22:57 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 7 Feb 2006 21:57:38 +0000 (21:57 +0000)
* testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib-related
part of LD_LIBRARY_PATH manually.

From-SVN: r110720

libgomp/ChangeLog
libgomp/testsuite/lib/libgomp-dg.exp

index 467629f6184e67b722667522c88f1c1443188785..5a3878e2d2188cc83bc0684de75ee21189b30963 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
+       part of LD_LIBRARY_PATH manually.
+
 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR libgomp/25852
index f6fed67b209c54184c7f60088bda77dd515d6c61..d064a8012c8abfd3307bf2acfc0bdfb19c62f36c 100644 (file)
@@ -94,14 +94,29 @@ proc libgomp_init { args } {
     # Compute what needs to be put into LD_LIBRARY_PATH
     set ld_library_path ".:${blddir}/.libs"
 
-    if {$gccdir != ""} {
-       append ld_library_path ":${gccdir}"
-    }
-
     if { [info exists lang_test_file] && [file exists "${blddir}/"] } {
        append ld_library_path ":${blddir}/${lang_library_path}"
     }
-    append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+
+    # Compute what needs to be added to the existing LD_LIBRARY_PATH.
+    if {$gccdir != ""} {
+       append ld_library_path ":${gccdir}"
+       set compiler [lindex $GCC_UNDER_TEST 0]
+
+       if { [is_remote host] == 0 && [which $compiler] != 0 } {
+         foreach i "[exec $compiler --print-multi-lib]" {
+           set mldir ""
+           regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
+           set mldir [string trimright $mldir "\;@"]
+           if { "$mldir" == "." } {
+             continue
+           }
+           if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+             append ld_library_path ":${gccdir}/${mldir}"
+           }
+         }
+       }
+    }
     set_ld_library_path_env_vars
 
     set ALWAYS_CFLAGS ""