File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ if { [check_lto_fat_available] } {
4747 set no_lto "-fno-lto"
4848}
4949
50- set lto_plugin [string trim [run_host_cmd "$CC_FOR_TARGET" "-print-prog-name=liblto_plugin.so"]]
51-
5250# List contains test-items:
5351# 0:program name
5452# 1:program options
@@ -64,7 +62,7 @@ proc run_lto_binutils_test { lto_tests } {
6462 global objdump
6563 global READELF
6664 global strip
67- global lto_plugin
65+ global plug_opt
6866
6967 foreach testitem $lto_tests {
7068 set prog_name [lindex $testitem 0]
@@ -101,7 +99,7 @@ proc run_lto_binutils_test { lto_tests } {
10199 remote_file host delete $output
102100 }
103101
104- append prog_options " --plugin $lto_plugin "
102+ append prog_options " $plug_opt "
105103
106104 set cmd_options "$prog_options $prog_output $input"
107105 set test_name "$prog_name $cmd_options"
@@ -192,7 +190,7 @@ run_cc_link_tests [list \
192190 ] \
193191 [list \
194192 "Build libstrip-1a.a" \
195- "--plugin $lto_plugin " \
193+ "$plug_opt " \
196194 "-O2 -flto $lto_no_fat" \
197195 { strip-1a.c } \
198196 {} \
@@ -206,7 +204,7 @@ run_cc_link_tests [list \
206204 ] \
207205 [list \
208206 "Build libstrip-1a-fat.a" \
209- "--plugin $lto_plugin " \
207+ "$plug_opt " \
210208 "-O2 -flto $lto_fat" \
211209 { strip-1a-fat.c } \
212210 {} \
Original file line number Diff line number Diff line change @@ -1158,9 +1158,8 @@ remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
11581158run_dump_test "lto-10r"
11591159remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
11601160set testname "nm mixed object"
1161- set lto_plugin [string trim [run_host_cmd "$CC_FOR_TARGET" "-print-prog-name=liblto_plugin.so"]]
1162- if { [ regexp "liblto_plugin.so" $lto_plugin ] } {
1163- set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin tmpdir/lto-10.o"]
1161+ if { $plug_opt != "" } {
1162+ set exec_output [run_host_cmd "$NM" "$plug_opt tmpdir/lto-10.o"]
11641163 if { [ regexp "(D|T) main" $exec_output ] } {
11651164 pass $testname
11661165 } else {
You can’t perform that action at this time.
0 commit comments