summaryrefslogtreecommitdiffstats
path: root/patches/04_ld-fix-cdtest-send-log-commands.patch
blob: 3d121f5254d7fa3629396cd13565a28e20f1eb5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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