mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
ld: Skip bootstrap tests for -fprofile-generate=
Make plug_opt available to all linker tests. Skip bootstrap tests when linker is compiled with -fprofile-generate=. * testsuite/ld-plugin/lto.exp (plug_opt): Moved to ... * testsuite/config/default.exp (plug_opt): Here. New. * testsuite/ld-bootstrap/bootstrap.exp: Skip when linker is compiled with -fprofile-generate=.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2020-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* testsuite/ld-plugin/lto.exp (plug_opt): Moved to ...
|
||||||
|
* testsuite/config/default.exp (plug_opt): Here. New.
|
||||||
|
* testsuite/ld-bootstrap/bootstrap.exp: Skip when linker is
|
||||||
|
compiled with -fprofile-generate=.
|
||||||
|
|
||||||
2020-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
2020-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/config/default.exp (NOLTO_CFLAGS): New.
|
* testsuite/config/default.exp (NOLTO_CFLAGS): New.
|
||||||
|
@ -424,3 +424,20 @@ if { [istarget alpha*-*-*vms*] } {
|
|||||||
}
|
}
|
||||||
unset f src
|
unset f src
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set plugin_names {
|
||||||
|
liblto_plugin.so
|
||||||
|
liblto_plugin-0.dll
|
||||||
|
cyglto_plugin-0.dll
|
||||||
|
}
|
||||||
|
set plug_opt ""
|
||||||
|
foreach plug $plugin_names {
|
||||||
|
set plug_so [run_host_cmd $CC "--print-prog-name $plug"]
|
||||||
|
if { $plug_so eq $plug } then {
|
||||||
|
set plug_so [run_host_cmd $CC "--print-file-name $plug"]
|
||||||
|
}
|
||||||
|
if { $plug_so ne $plug } then {
|
||||||
|
set plug_opt "--plugin $plug_so"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -29,7 +29,13 @@ if ![isnative] {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine if plugin support is present.
|
# Skip for -fprofile-generate=.
|
||||||
|
catch "exec $nm $plug_opt $OFILES" exec_output
|
||||||
|
send_log "foo: $exec_output"
|
||||||
|
if { [ string match "*__gcov_*" $exec_output ] } {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
|
remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
|
||||||
set tmp [file_contents "plugin-support"]
|
set tmp [file_contents "plugin-support"]
|
||||||
regexp ".*\(--plugin\).*\n" $tmp foo plugins
|
regexp ".*\(--plugin\).*\n" $tmp foo plugins
|
||||||
|
@ -41,22 +41,6 @@ proc restore_notify { } {
|
|||||||
set CXXFLAGS "$saved_CXXFLAGS"
|
set CXXFLAGS "$saved_CXXFLAGS"
|
||||||
}
|
}
|
||||||
|
|
||||||
set plugin_names {
|
|
||||||
liblto_plugin.so
|
|
||||||
liblto_plugin-0.dll
|
|
||||||
cyglto_plugin-0.dll
|
|
||||||
}
|
|
||||||
set plug_opt ""
|
|
||||||
foreach plug $plugin_names {
|
|
||||||
set plug_so [run_host_cmd $CC "--print-prog-name $plug"]
|
|
||||||
if { $plug_so eq $plug } then {
|
|
||||||
set plug_so [run_host_cmd $CC "--print-file-name $plug"]
|
|
||||||
}
|
|
||||||
if { $plug_so ne $plug } then {
|
|
||||||
set plug_opt "--plugin $plug_so"
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set lto_fat ""
|
set lto_fat ""
|
||||||
set lto_no_fat ""
|
set lto_no_fat ""
|
||||||
if { [check_lto_fat_available] } {
|
if { [check_lto_fat_available] } {
|
||||||
|
Reference in New Issue
Block a user