mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
ld: Set plug_opt only if compiler is available
* testsuite/config/default.exp (plug_opt): Set only if compiler is available.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2020-10-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* testsuite/config/default.exp (plug_opt): Set only if compiler
|
||||
is available.
|
||||
|
||||
2020-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* testsuite/ld-plugin/lto.exp (plug_opt): Moved to ...
|
||||
|
@ -425,19 +425,21 @@ if { [istarget alpha*-*-*vms*] } {
|
||||
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 { [check_compiler_available] } {
|
||||
set plugin_names {
|
||||
liblto_plugin.so
|
||||
liblto_plugin-0.dll
|
||||
cyglto_plugin-0.dll
|
||||
}
|
||||
if { $plug_so ne $plug } then {
|
||||
set plug_opt "--plugin $plug_so"
|
||||
break
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user