This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFA:] Pretty please make testsuite_shared.so optional when testing
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Oct 2005 05:02:02 +0200
- Subject: [RFA:] Pretty please make testsuite_shared.so optional when testing
For my cross-target cris-axis-linux-gnu, I append "-static" to
compilation flags in cris-sim.exp, so I can run the tests in a
simulator (which doesn't have support for dynamic linking).
Recent-ish changes require, as quoted in patch context below,
that if a .so was created in the build process, that also works
while testing.
Instead of the "error" call in proc libstdc++_init while
building the .so there, it'd likely work to change it to a
"verbose" (logging) call. The problem being that the "error"
call makes the whole test-run abort immediately, stopping any
and all testing (see further below), while the caller, abi.exp,
would make a graceful exit anyway, if the testsuite_shared.so
doesn't exist.
I'm testing a much simpler patch, to just don't do .so testing
for cross builds. Ok if it works? Better suggestion?
* testsuite/lib/libstdc++.exp (libstdc++_init): Require
native testing before setting v3-sharedlib to 1.
Index: libstdc++.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++.exp,v
retrieving revision 1.49
diff -p -u -r1.49 libstdc++.exp
--- libstdc++.exp 15 Sep 2005 18:58:02 -0000 1.49
+++ libstdc++.exp 13 Oct 2005 02:45:54 -0000
@@ -133,7 +133,7 @@ proc libstdc++_init { testfile } {
set v3-sharedlib 0
set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.so]
if {$sharedlibdir != ""} {
- if { [string match "*-*-linux*" $target_triplet] } {
+ if { [string match "*-*-linux*" $target_triplet] && [isnative] } {
set v3-sharedlib 1
verbose -log "shared library support detected"
}
This is the disaster I see with tcl-8.4.5-7, dejagnu-1.4.4
(pristine) as well as with tcl-8.4.9-3 and dejagnu-1.4.4-4:
Target is cris-axis-linux-gnu
Host is cris-axis-linux-gnu
Build is i686-pc-linux-gnu
=== libstdc++ tests ===
Schedule of variations:
cris-sim
Running target cris-sim
Using ~/dejagnuboards/cris-sim.exp as board description file for target.
Using /usr/share/dejagnu/config/sim.exp as generic interface file for target.
Using /usr/share/dejagnu/baseboards/basic-sim.exp as board description file for target.
Using /home/hp/combined/combined/libstdc++-v3/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-abi/abi.exp ...
ERROR: tcl error sourcing /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-abi/abi.exp.
ERROR: could not compile testsuite_shared.cc
while executing
"error "could not compile $f""
(procedure "v3-build_support" line 56)
invoked from within
"v3-build_support"
(file "/home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-abi/abi.exp" line 22)
invoked from within
"source /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-abi/abi.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-abi/abi.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
Running /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-dg/normal.exp ...
ERROR: tcl error sourcing /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-dg/normal.exp.
ERROR: could not compile testsuite_shared.cc
while executing
"error "could not compile $f""
(procedure "v3-build_support" line 56)
invoked from within
"v3-build_support"
(file "/home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-dg/normal.exp" line 25)
invoked from within
"source /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-dg/normal.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-dg/normal.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
=== libstdc++ Summary ===
make[6]: Leaving directory `/home/hp/combined/crislinux-sim/cris-axis-linux-gnu/libstdc++-v3/testsuite'
brgds, H-P