aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-03-17 05:33:00 +0000
committerAlan Modra <amodra@gmail.com>2009-03-17 05:33:00 +0000
commitbba21f1561dba85f85c50bc995443fd51c80609d (patch)
tree1b1ef85d9abd60019afe6d0afd109e204527cf84 /ld/testsuite/config
parent6b251945f5a8ccc4856e0401c07f51d6f1764c72 (diff)
downloadgdb-bba21f1561dba85f85c50bc995443fd51c80609d.zip
gdb-bba21f1561dba85f85c50bc995443fd51c80609d.tar.gz
gdb-bba21f1561dba85f85c50bc995443fd51c80609d.tar.bz2
ld/
* 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.
Diffstat (limited to 'ld/testsuite/config')
-rw-r--r--ld/testsuite/config/default.exp10
1 files changed, 9 insertions, 1 deletions
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index ab35ecf..952be42 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -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"
}
}