From ec233c75fbec8a4a8dd5a8dc3479acc44eeb1afa Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Wed, 23 May 2001 07:05:14 +0000 Subject: [PATCH] libstdc++-v3-dg.exp (libstdc++-v3-init): Set ld_library_path. 2001-05-22 Benjamin Kosnik libstdc++/2841 * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set ld_library_path. (libstdc++-v3_set_ld_library_path): New, copied from g++.exp. (libstdc++-v3-finish): Remove. (libstdc++-v3_exit): Remove. From-SVN: r42487 --- libstdc++-v3/ChangeLog | 11 +++- .../testsuite/lib/libstdc++-v3-dg.exp | 61 +++++++++---------- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1a8280ec561..fe5bdc3a6f3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2001-05-22 Benjamin Kosnik + + libstdc++/2841 + * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set + ld_library_path. + (libstdc++-v3_set_ld_library_path): New, copied from g++.exp. + (libstdc++-v3-finish): Remove. + (libstdc++-v3_exit): Remove. + 2001-05-22 Phil Edwards * docs/html/documentation.html: Point to doxygen output. @@ -35,7 +44,7 @@ (wcsstr): Same. (wmemchr): Same. -2001-05-21 Benjamin Kosnik +2001-05-21 Benjamin Kosnik * testsuite/21_strings/c_strings.cc (main): Fix. diff --git a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp b/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp index a2df3ed4e56..76eeeac5eca 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp @@ -28,9 +28,29 @@ proc libstdc++-v3-init { args } { global cxxflags global objdir global gluefile wrap_flags + global ld_library_path set blddir [lookfor_file $outdir libstdc++-v3] + # By default, we assume we want to run program images. + global dg-do-what-default + set dg-do-what-default run + + # Copy any required data files. + foreach tst [glob -nocomplain "$srcdir/*/*.tst"] { + file copy -force $tst $outdir + } + foreach txt [glob -nocomplain "$srcdir/*/*.txt"] { + file copy -force $txt $outdir + } + + # set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found. + set ld_library_path "." + append ld_library_path ":${blddir}/../../gcc" + append ld_library_path ":${blddir}/src/.libs" + + # Do a bunch of handstands and backflips for cross compiling and + # finding simulators... if [is_remote host] { set header [remote_download host ${srcdir}/debug_assert.h] if { $header == "" } { @@ -54,18 +74,6 @@ proc libstdc++-v3-init { args } { } } - # By default, we assume we want to run program images. - global dg-do-what-default - set dg-do-what-default run - - # Copy any required data files. - foreach tst [glob -nocomplain "$srcdir/*/*.tst"] { - file copy -force $tst $outdir - } - foreach txt [glob -nocomplain "$srcdir/*/*.txt"] { - file copy -force $txt $outdir - } - if { [target_info needs_status_wrapper]!="" && ![info exists gluefile] } { set gluefile ${objdir}/testglue.o; set result [build_wrapper $gluefile]; @@ -76,7 +84,6 @@ proc libstdc++-v3-init { args } { unset gluefile } } - } proc libstdc++-v3-dg-test { prog do_what extra_tool_flags } { @@ -143,28 +150,20 @@ proc libstdc++-v3_target_compile { source dest type options } { set cxx_final [concat $cxx_final $cxxflags] set cxx_final [concat $cxx_final $includes] - # XXX - set cxx_final [concat $cxx_final -static] - lappend options "compiler=$cxx_final"; return [target_compile $source $dest $type $options] } - -proc libstdc++-v3_exit { args } { - global gluefile; - - if [info exists gluefile] { - file_on_build delete $gluefile; - unset gluefile; - } -} - -proc libstdc++-v3-finish { } { - # do hacks to remove any check-DEJAGNU errors -set exit_status 0 -set status 0 -#return 0 +# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but +# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH +# (for the 64-bit ABI). The right way to do this would be to modify +# unix.exp -- but that's not an option since it's part of DejaGNU +# proper, so we do it here, by trickery. We really only need to do +# this on IRIX, but it shouldn't hurt to do it anywhere else. +proc libstdc++-v3_set_ld_library_path { name element op } { + setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH] + setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH] } +trace variable env(LD_LIBRARY_PATH) w libstdc++-v3_set_ld_library_path