Commit 0b694555 by Mark Mitchell Committed by Mark Mitchell

libstdc++.exp (libstdc++_wchar_t): Rename to ...

	* testsuite/lib/libstdc++.exp (libstdc++_wchar_t): Rename to ...
	(v3-wchar_t): ... this.
	(libstdc++_threads): Rename to ...
	(v3-threads): ... this.
	(libstdc++_test_objs): Rename to ...
	(v3-test_objs): ... this.
	(libstdc++_build_support): Rename to ...
	(v3-build_support): ... this.
	* testsuite/libstdc++-dg/normal.exp: Adjust to use new names.

From-SVN: r96957
parent 2852cd64
2005-03-23 Mark Mitchell <mark@codesourcery.com> 2005-03-23 Mark Mitchell <mark@codesourcery.com>
* testsuite/lib/libstdc++.exp (libstdc++_wchar_t): Rename to ...
(v3-wchar_t): ... this.
(libstdc++_threads): Rename to ...
(v3-threads): ... this.
(libstdc++_test_objs): Rename to ...
(v3-test_objs): ... this.
(libstdc++_build_support): Rename to ...
(v3-build_support): ... this.
* testsuite/libstdc++-dg/normal.exp: Adjust to use new names.
* testsuite/lib/libstdc++.exp (libstdc++_init): Improve handling * testsuite/lib/libstdc++.exp (libstdc++_init): Improve handling
of compilers not in the build directory. of compilers not in the build directory.
(libstdc++_wchar_t): New variable. (libstdc++_wchar_t): New variable.
......
...@@ -248,13 +248,13 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { ...@@ -248,13 +248,13 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
} }
# True if the library supports wchar_t. # True if the library supports wchar_t.
set libstdc++_wchar_t 0 set v3-wchar_t 0
# True if the library supports threads. # True if the library supports threads.
set libstdc++_threads 0 set v3-threads 0
# A string naming object files to be linked into all tests. # A string naming object files to be linked into all tests.
set libstdc++_test_objs "" set v3-test_objs ""
# Called from libstdc++-dg-test above. Calls back into system's # Called from libstdc++-dg-test above. Calls back into system's
# target_compile to actually do the work. # target_compile to actually do the work.
...@@ -265,7 +265,7 @@ proc v3_target_compile { source dest type options } { ...@@ -265,7 +265,7 @@ proc v3_target_compile { source dest type options } {
global cxxflags global cxxflags
global includes global includes
global blddir global blddir
global libstdc++_test_objs global v3-test_objs
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}" lappend options "libs=${gluefile}"
...@@ -279,7 +279,7 @@ proc v3_target_compile { source dest type options } { ...@@ -279,7 +279,7 @@ proc v3_target_compile { source dest type options } {
set cxx_final [concat $cxx_final $includes] set cxx_final [concat $cxx_final $includes]
# Link the support objects into executables. # Link the support objects into executables.
if { $type == "executable" } { if { $type == "executable" } {
set cxx_final [concat $cxx_final ${libstdc++_test_objs}] set cxx_final [concat $cxx_final ${v3-test_objs}]
} }
lappend options "compiler=$cxx_final" lappend options "compiler=$cxx_final"
...@@ -288,18 +288,18 @@ proc v3_target_compile { source dest type options } { ...@@ -288,18 +288,18 @@ proc v3_target_compile { source dest type options } {
} }
# Build the support objects linked in with the libstdc++ tests. In # Build the support objects linked in with the libstdc++ tests. In
# addition, set libstdc++_wchar_t, libstdc++_threads, and libstdc++_test_objs # addition, set v3-wchar_t, v3-threads, and v3-test_objs
# appropriately. # appropriately.
proc libstdc++_build_support {} { proc v3-build_support {} {
global srcdir global srcdir
global libstdc++_wchar_t global v3-wchar_t
global libstdc++_threads global v3-threads
global libstdc++_test_objs global v3-test_objs
# Figure out whether or not the library supports certain features. # Figure out whether or not the library supports certain features.
set libstdc++_wchar_t 0 set v3-wchar_t 0
set libstdc++_threads 0 set v3-threads 0
set libstdc++_test_objs "" set v3-test_objs ""
set config_src "config.cc" set config_src "config.cc"
set f [open $config_src "w"] set f [open $config_src "w"]
...@@ -310,10 +310,10 @@ proc libstdc++_build_support {} { ...@@ -310,10 +310,10 @@ proc libstdc++_build_support {} {
foreach l $preprocessed { foreach l $preprocessed {
if { [string first "_GLIBCXX_USE_WCHAR_T" $l] != -1 } { if { [string first "_GLIBCXX_USE_WCHAR_T" $l] != -1 } {
verbose -log "wchar_t support detected" verbose -log "wchar_t support detected"
set libstdc++_wchar_t 1 set v3-wchar_t 1
} elseif { [string first "_GLIBCXX_HAVE_GTHR_DEFAULT" $l] != -1 } { } elseif { [string first "_GLIBCXX_HAVE_GTHR_DEFAULT" $l] != -1 } {
verbose -log "thread support detected" verbose -log "thread support detected"
set libstdc++_threads 1 set v3-threads 1
} }
} }
...@@ -327,6 +327,6 @@ proc libstdc++_build_support {} { ...@@ -327,6 +327,6 @@ proc libstdc++_build_support {} {
!= "" } { != "" } {
error "could not compile $f" error "could not compile $f"
} }
append libstdc++_test_objs "$object_file " append v3-test_objs "$object_file "
} }
} }
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
dg-init dg-init
# Build the support objects. # Build the support objects.
libstdc++_build_support v3-build_support
# Find directories that might have tests. # Find directories that might have tests.
set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"] set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
...@@ -51,8 +51,8 @@ foreach s $subdirs { ...@@ -51,8 +51,8 @@ foreach s $subdirs {
# 4. thread tests, if not supported. # 4. thread tests, if not supported.
if { [string first _xin $t] == -1 if { [string first _xin $t] == -1
&& [string first performance $t] == -1 && [string first performance $t] == -1
&& (${libstdc++_wchar_t} || [string first wchar_t $t] == -1) && (${v3-wchar_t} || [string first wchar_t $t] == -1)
&& (${libstdc++_threads} || [string first thread $t] == -1) } { && (${v3-threads} || [string first thread $t] == -1) } {
lappend tests $t lappend tests $t
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment