ld/
authorAlan Modra <amodra@gmail.com>
Tue, 17 Mar 2009 05:33:00 +0000 (05:33 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Mar 2009 05:33:00 +0000 (05:33 +0000)
* 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.

ld/ChangeLog
ld/configure.host
ld/testsuite/ChangeLog
ld/testsuite/config/default.exp

index b721b25..7937748 100644 (file)
@@ -1,5 +1,10 @@
 2009-03-17  Alan Modra  <amodra@bigpond.net.au>
 
+       * configure.host (HOSTING_LIBS): Two dollars on shell variable
+       expansion to suit make.
+
+2009-03-17  Alan Modra  <amodra@bigpond.net.au>
+
        * configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
        * Makefile.am (check-DEJAGNU): Set DO_COMPARE.
        * aclocal.m4: Regenerate.
index 9174971..a6b1da3 100644 (file)
@@ -10,7 +10,7 @@
 
 HDEFINES=
 HOSTING_CRT0=/lib/crt0.o
-HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; if [ -f ../gcc/libunwind.a ]; then libgcc="$libgcc ../gcc/libunwind.a"; else libunwind=\`${CC} -print-file-name=libunwind.a\`; if [ x"$libunwind" != xlibunwind.a ]; then libgcc="$libgcc $libunwind"; fi; fi; echo --start-group $libgcc -lc --end-group`'
+HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$$libgcc $$libgcc_eh"; fi; fi; if [ -f ../gcc/libunwind.a ]; then libgcc="$$libgcc ../gcc/libunwind.a"; else libunwind=\`${CC} -print-file-name=libunwind.a\`; if [ x"$$libunwind" != xlibunwind.a ]; then libgcc="$$libgcc $$libunwind"; fi; fi; echo --start-group $$libgcc -lc --end-group`'
 
 #
 #      Generic configurations:
index 78c941b..b13f7a0 100644 (file)
@@ -1,5 +1,10 @@
 2009-03-17  Alan Modra  <amodra@bigpond.net.au>
 
+       * config/default.exp (get_link_files): Replace double dollars with
+       single dollars.
+
+2009-03-17  Alan Modra  <amodra@bigpond.net.au>
+
        * ld-bootstrap/bootstrap.exp: Use DO_COMPARE.  Remove unnecessary
        cleanup and log output.
 
index ab35ecf..952be42 100644 (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"
     }
 }