Commit 43e03430 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

libstdc++.exp (v3-build_support): If it exists, use env(AR_FOR_TARGET).

	* testsuite/lib/libstdc++.exp (v3-build_support) <ar>: If it
	exists, use env(AR_FOR_TARGET).  Log the command.
	<ranlib>: Similar.

From-SVN: r122950
parent c123d98f
2007-03-15 Hans-Peter Nilsson <hp@axis.com>
* testsuite/lib/libstdc++.exp (v3-build_support) <ar>: If it
exists, use env(AR_FOR_TARGET). Log the command.
<ranlib>: Similar.
2007-03-14 Nathan Sidwell <nathan@codesourcery.com> 2007-03-14 Nathan Sidwell <nathan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>:: Joseph Myers <joseph@codesourcery.com>::
......
...@@ -401,6 +401,7 @@ proc v3_target_compile_as_c { source dest type options } { ...@@ -401,6 +401,7 @@ proc v3_target_compile_as_c { 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 v3-wchar_t, v3-threads, and v3-symver appropriately. # addition, set v3-wchar_t, v3-threads, and v3-symver appropriately.
proc v3-build_support { } { proc v3-build_support { } {
global env
global srcdir global srcdir
global v3-wchar_t global v3-wchar_t
global v3-threads global v3-threads
...@@ -466,13 +467,23 @@ proc v3-build_support { } { ...@@ -466,13 +467,23 @@ proc v3-build_support { } {
} }
# Collect into libtestc++.a # Collect into libtestc++.a
set ar [transform "ar"] if [info exists env(AR_FOR_TARGET)] {
set ar $env(AR_FOR_TARGET)
} else {
set ar [transform "ar"]
}
set arcommand "$ar -rc ./libtestc++.a ${libtest_objs}" set arcommand "$ar -rc ./libtestc++.a ${libtest_objs}"
verbose -log "$arcommand"
set result [lindex [local_exec "$arcommand" "" "" 300] 0] set result [lindex [local_exec "$arcommand" "" "" 300] 0]
verbose "link result is $result" verbose "link result is $result"
if { $result == 0 } { if { $result == 0 } {
set ranlib [transform "ranlib"] if [info exists env(RANLIB_FOR_TARGET)] {
set ranlib $env(RANLIB_FOR_TARGET)
} else {
set ranlib [transform "ranlib"]
}
set ranlibcommand "$ranlib ./libtestc++.a" set ranlibcommand "$ranlib ./libtestc++.a"
verbose -log "$ranlibcommand"
set result [lindex [local_exec "$ranlibcommand" "" "" 300] 0] set result [lindex [local_exec "$ranlibcommand" "" "" 300] 0]
if { $result != 0 } { if { $result != 0 } {
error "could not link libtestc++.a" error "could not link libtestc++.a"
......
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