summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch187
1 files changed, 0 insertions, 187 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch
deleted file mode 100644
index be0888590a..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch
+++ /dev/null
@@ -1,187 +0,0 @@
1From 80b672d804357f2a1be04ac4e5a4d4c7d0d3b348 Mon Sep 17 00:00:00 2001
2From: "H.J. Lu" <hjl.tools@gmail.com>
3Date: Wed, 14 Nov 2012 15:54:04 +0000
4Subject: [PATCH 03/27] Assemble all sources files in each test
5
6 * ld-elf/shared.exp (build_cxx_tests): Move out the commented out
7 test.
8
9 * lib/ld-lib.exp (run_ld_link_exec_tests): Assemble all sources
10 files in each test.
11---
12 ld/testsuite/ChangeLog | 8 ++++
13 ld/testsuite/ld-elf/shared.exp | 8 ++--
14 ld/testsuite/lib/ld-lib.exp | 97 ++++++++++++++++++++--------------------
15 3 files changed, 60 insertions(+), 53 deletions(-)
16
17diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
18index ffcfa7e..e02432f 100644
19--- a/ld/testsuite/ChangeLog
20+++ b/ld/testsuite/ChangeLog
21@@ -1,3 +1,11 @@
22+2012-11-14 H.J. Lu <hongjiu.lu@intel.com>
23+
24+ * ld-elf/shared.exp (build_cxx_tests): Move out the commented out
25+ test.
26+
27+ * lib/ld-lib.exp (run_ld_link_exec_tests): Assemble all sources
28+ files in each test.
29+
30 2012-10-16 Sofiane Naci <sofiane.naci@arm.com>
31
32 * ld-aarch64/tlsle-symbol-offset.s: New file.
33diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
34index c00f3e5..c9f2056 100644
35--- a/ld/testsuite/ld-elf/shared.exp
36+++ b/ld/testsuite/ld-elf/shared.exp
37@@ -336,14 +336,14 @@ set build_cxx_tests {
38 {del.cc new.cc} {} "libnew1b.so" "c++"}
39 }
40
41-set run_cxx_tests {
42- {"Run with libdl3a.so"
43- "-Wl,--no-as-needed tmpdir/libdl3a.so" ""
44- {dl3main.cc} "dl3a" "dl3a.out" "" "c++"}
45 # "-shared -Bsymbolic" only works with gcc 4.5.0 and newer.
46 # {"Run with libdl3b.so"
47 # "tmpdir/libdl3b.so" ""
48 # {dl3main.cc} "dl3b" "dl3b.out" "" "c++"}
49+set run_cxx_tests {
50+ {"Run with libdl3a.so"
51+ "-Wl,--no-as-needed tmpdir/libdl3a.so" ""
52+ {dl3main.cc} "dl3a" "dl3a.out" "" "c++"}
53 {"Run with libdl3c.so"
54 "-Wl,--no-as-needed tmpdir/libdl3c.so" ""
55 {dl3main.cc} "dl3c" "dl3a.out" "" "c++"}
56diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
57index bb4cb0d..49837dd 100644
58--- a/ld/testsuite/lib/ld-lib.exp
59+++ b/ld/testsuite/lib/ld-lib.exp
60@@ -1244,7 +1244,6 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
61 # verbose -log "ld_options is $ld_options"
62 # verbose -log "as_options is $as_options"
63 # verbose -log "src_files is $src_files"
64-# verbose -log "actions is $actions"
65 # verbose -log "binfile is $binfile"
66
67 # Assemble each file in the test.
68@@ -1261,68 +1260,68 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
69 } else {
70 ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/$src_file $objfile
71 }
72+ }
73
74- # We have to use $CC to build PIE and shared library.
75- if { [ string match "c" $lang ] } {
76- set link_proc ld_simple_link
77- set link_cmd $CC
78- } elseif { [ string match "c++" $lang ] } {
79- set link_proc ld_simple_link
80- set link_cmd $CXX
81- } elseif { [ string match "-shared" $ld_options ] \
82- || [ string match "-pie" $ld_options ] } {
83- set link_proc ld_simple_link
84- set link_cmd $CC
85- } else {
86- set link_proc ld_link
87- set link_cmd $ld
88- }
89+ # We have to use $CC to build PIE and shared library.
90+ if { [ string match "c" $lang ] } {
91+ set link_proc ld_simple_link
92+ set link_cmd $CC
93+ } elseif { [ string match "c++" $lang ] } {
94+ set link_proc ld_simple_link
95+ set link_cmd $CXX
96+ } elseif { [ string match "-shared" $ld_options ] \
97+ || [ string match "-pie" $ld_options ] } {
98+ set link_proc ld_simple_link
99+ set link_cmd $CC
100+ } else {
101+ set link_proc ld_link
102+ set link_cmd $ld
103+ }
104
105- if ![$link_proc $link_cmd $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
106- set failed 1
107- } else {
108+ if ![$link_proc $link_cmd $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
109+ set failed 1
110+ } else {
111+ set failed 0
112+ }
113+
114+ # Check if exec_output is expected.
115+ if { $warning != "" } then {
116+ verbose -log "returned with: <$exec_output>, expected: <$warning>"
117+ if { [regexp $warning $exec_output] } then {
118 set failed 0
119+ } else {
120+ set failed 1
121 }
122+ }
123
124- # Check if exec_output is expected.
125- if { $warning != "" } then {
126- verbose -log "returned with: <$exec_output>, expected: <$warning>"
127- if { [regexp $warning $exec_output] } then {
128- set failed 0
129- } else {
130- set failed 1
131- }
132- }
133+ if { $failed == 0 } {
134+ send_log "Running: $binfile > $binfile.out\n"
135+ verbose "Running: $binfile > $binfile.out"
136+ catch "exec $binfile > $binfile.out" exec_output
137
138- if { $failed == 0 } {
139- send_log "Running: $binfile > $binfile.out\n"
140- verbose "Running: $binfile > $binfile.out"
141- catch "exec $binfile > $binfile.out" exec_output
142+ if ![string match "" $exec_output] then {
143+ send_log "$exec_output\n"
144+ verbose "$exec_output" 1
145+ set failed 1
146+ } else {
147+ send_log "diff $binfile.out $srcdir/$subdir/$expfile\n"
148+ verbose "diff $binfile.out $srcdir/$subdir/$expfile"
149+ catch "exec diff $binfile.out $srcdir/$subdir/$expfile" exec_output
150+ set exec_output [prune_warnings $exec_output]
151
152 if ![string match "" $exec_output] then {
153 send_log "$exec_output\n"
154 verbose "$exec_output" 1
155 set failed 1
156- } else {
157- send_log "diff $binfile.out $srcdir/$subdir/$expfile\n"
158- verbose "diff $binfile.out $srcdir/$subdir/$expfile"
159- catch "exec diff $binfile.out $srcdir/$subdir/$expfile" exec_output
160- set exec_output [prune_warnings $exec_output]
161-
162- if ![string match "" $exec_output] then {
163- send_log "$exec_output\n"
164- verbose "$exec_output" 1
165- set failed 1
166- }
167 }
168 }
169+ }
170
171- if { $failed != 0 } {
172- fail $testname
173- } else {
174- set errcnt 0
175- pass $testname
176- }
177+ if { $failed != 0 } {
178+ fail $testname
179+ } else {
180+ set errcnt 0
181+ pass $testname
182 }
183 }
184 }
185--
1861.7.9.5
187