[v3] support for testing shared builds
Benjamin Kosnik
bkoz@redhat.com
Tue May 22 18:23:00 GMT 2001
Removes the one remaining fail, because it's only static.
>From the very helpful bug report libstdc++/2841
I'm going to wait a bit before applying this. I'd appreciate it if
people who are currently having difficulties with the -static ness of
the current dejagnu testsuite could give me feedback.
thanks,
benjamin
2001-05-22 Benjamin Kosnik <bkoz@redhat.com>
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.
Index: testsuite/lib/libstdc++-v3-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp,v
retrieving revision 1.4
diff -c -p -r1.4 libstdc++-v3-dg.exp
*** libstdc++-v3-dg.exp 2001/05/18 18:55:44 1.4
--- libstdc++-v3-dg.exp 2001/05/23 01:15:28
*************** proc libstdc++-v3-init { args } {
*** 28,36 ****
--- 28,56 ----
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 == "" } {
*************** proc libstdc++-v3-init { args } {
*** 54,71 ****
}
}
- # 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];
--- 74,79 ----
*************** proc libstdc++-v3-init { args } {
*** 76,82 ****
unset gluefile
}
}
-
}
proc libstdc++-v3-dg-test { prog do_what extra_tool_flags } {
--- 84,89 ----
*************** proc libstdc++-v3_target_compile { sourc
*** 143,170 ****
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
}
--- 150,169 ----
set cxx_final [concat $cxx_final $cxxflags]
set cxx_final [concat $cxx_final $includes]
lappend options "compiler=$cxx_final";
return [target_compile $source $dest $type $options]
}
! # 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
More information about the Libstdc++
mailing list