set no_lto "-fno-lto"
}
-set lto_plugin [string trim [run_host_cmd "$CC_FOR_TARGET" "-print-prog-name=liblto_plugin.so"]]
-
# List contains test-items:
# 0:program name
# 1:program options
global objdump
global READELF
global strip
- global lto_plugin
+ global plug_opt
foreach testitem $lto_tests {
set prog_name [lindex $testitem 0]
remote_file host delete $output
}
- append prog_options " --plugin $lto_plugin"
+ append prog_options " $plug_opt"
set cmd_options "$prog_options $prog_output $input"
set test_name "$prog_name $cmd_options"
] \
[list \
"Build libstrip-1a.a" \
- "--plugin $lto_plugin" \
+ "$plug_opt" \
"-O2 -flto $lto_no_fat" \
{ strip-1a.c } \
{} \
] \
[list \
"Build libstrip-1a-fat.a" \
- "--plugin $lto_plugin" \
+ "$plug_opt" \
"-O2 -flto $lto_fat" \
{ strip-1a-fat.c } \
{} \
run_dump_test "lto-10r"
remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
set testname "nm mixed object"
-set lto_plugin [string trim [run_host_cmd "$CC_FOR_TARGET" "-print-prog-name=liblto_plugin.so"]]
-if { [ regexp "liblto_plugin.so" $lto_plugin ] } {
- set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin tmpdir/lto-10.o"]
+if { $plug_opt != "" } {
+ set exec_output [run_host_cmd "$NM" "$plug_opt tmpdir/lto-10.o"]
if { [ regexp "(D|T) main" $exec_output ] } {
pass $testname
} else {