summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/04_ld-fix-cdtest-send-log-commands.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/patches/04_ld-fix-cdtest-send-log-commands.patch b/patches/04_ld-fix-cdtest-send-log-commands.patch
new file mode 100644
index 0000000..3d121f5
--- /dev/null
+++ b/patches/04_ld-fix-cdtest-send-log-commands.patch
@@ -0,0 +1,90 @@
+Author: "P. J. McDermott" <pjm@nac.net>
+Subject: ld: Fix cdtest send_log commands
+
+send_log accepts no options and exits with an error if its first
+argument is anything that looks like an option. So, make the first
+argument "--" to end option parsing.
+
+This fixes the following error:
+
+ Running /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/ld-cdtest/cdtest.exp ...
+ ERROR: tcl error sourcing /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/ld-cdtest/cdtest.exp.
+ ERROR: usage: send [args] string
+ while executing
+ "send_log "$exec_output\n""
+ invoked from within
+ "if ![string match "" $exec_output] then {
+ send_log "$exec_output\n"
+ verbose "$exec_output" 1
+
+ send_log "Checking against Named Return ..."
+ invoked from within
+ "if ![string match "" $exec_output] then {
+ send_log "$exec_output\n"
+ verbose "$exec_output" 1
+
+ fail $test1
+ } else {
+ send_log "diff tmpdir/cdt..."
+ invoked from within
+ "if ![ld_link $ld tmpdir/cdtest {tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o tmpdir/cdtest-main.o}] {
+ fail $test1
+ } else {
+ send_log "tmpdir/cdtes..."
+ (file "/usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/ld-cdtest/cdtest.exp" line 52)
+ invoked from within
+ "source /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/ld-cdtest/cdtest.exp"
+ ("uplevel" body line 1)
+ invoked from within
+ "uplevel #0 source /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/ld-cdtest/cdtest.exp"
+ invoked from within
+ "catch "uplevel #0 source $test_file_name""
+
+diff -Naur src.orig/ld/testsuite/ld-cdtest/cdtest.exp src/ld/testsuite/ld-cdtest/cdtest.exp
+--- src.orig/ld/testsuite/ld-cdtest/cdtest.exp 2009-09-02 03:25:38.000000000 -0400
++++ src/ld/testsuite/ld-cdtest/cdtest.exp 2013-12-09 00:47:09.859950940 -0500
+@@ -57,7 +57,7 @@
+ catch "exec tmpdir/cdtest >tmpdir/cdtest.out" exec_output
+
+ if ![string match "" $exec_output] then {
+- send_log "$exec_output\n"
++ send_log -- "$exec_output\n"
+ verbose "$exec_output" 1
+
+ fail $test1
+@@ -68,7 +68,7 @@
+ set exec_output [prune_warnings $exec_output]
+
+ if ![string match "" $exec_output] then {
+- send_log "$exec_output\n"
++ send_log -- "$exec_output\n"
+ verbose "$exec_output" 1
+
+ send_log "Checking against Named Return Value optimization\n"
+@@ -85,7 +85,7 @@
+ if [string match "" $exec_output] then {
+ pass $test1
+ } else {
+- send_log "$exec_output\n"
++ send_log -- "$exec_output\n"
+ verbose "$exec_output" 1
+
+ fail $test1
+@@ -104,7 +104,7 @@
+ catch "exec tmpdir/cdtest >tmpdir/cdtest.out" exec_output
+
+ if ![string match "" $exec_output] then {
+- send_log "$exec_output\n"
++ send_log -- "$exec_output\n"
+ verbose "$exec_output" 1
+
+ fail $test2
+@@ -117,7 +117,7 @@
+ if [string match "" $exec_output] then {
+ pass $test2
+ } else {
+- send_log "$exec_output\n"
++ send_log -- "$exec_output\n"
+ verbose "$exec_output" 1
+
+ fail $test2