* configure.host (HOSTING_LIBS): Two dollars on shell variable
	expansion to suit make.
ld/testsuite
	* config/default.exp (get_link_files): Replace double dollars with
	single dollars.
This commit is contained in:
Alan Modra
2009-03-17 05:33:00 +00:00
parent 6b251945f5
commit bba21f1561
4 changed files with 20 additions and 2 deletions

View File

@ -115,9 +115,17 @@ proc get_link_files {varname} {
global srcdir
global CC
if ![info exists $varname] {
set status [catch "exec sh -c \"host='$target_triplet' && CC='$CC' && . $srcdir/../configure.host && eval echo \\$$varname\"" result]
#configure.host returns variables that can be substituted into
#makefile rules, with embedded shell variable expansions.
#make wants $$shell_var, we want $shell_var ...
set cmd "host='$target_triplet' && . $srcdir/../configure.host && sed -e 's,\\\$\\\$,\$,g' <<EOF\n\$$varname\nEOF"
set status [catch "exec sh -c [list $cmd]" result]
if $status { error "Error getting native link files: $result" }
set cmd "CC='$CC' && eval echo \"$result\""
set status [catch "exec sh -c [list $cmd]" result]
if $status { error "Error getting native link files: $result" }
set $varname $result
send_log "$varname = $result\n"
}
}