mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50: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>
|
2020-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/ld-plugin/lto.exp (plug_opt): Moved to ...
|
* testsuite/ld-plugin/lto.exp (plug_opt): Moved to ...
|
||||||
|
@ -425,19 +425,21 @@ 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 ""
|
set plug_opt ""
|
||||||
foreach plug $plugin_names {
|
if { [check_compiler_available] } {
|
||||||
set plug_so [run_host_cmd $CC "--print-prog-name $plug"]
|
set plugin_names {
|
||||||
if { $plug_so eq $plug } then {
|
liblto_plugin.so
|
||||||
set plug_so [run_host_cmd $CC "--print-file-name $plug"]
|
liblto_plugin-0.dll
|
||||||
|
cyglto_plugin-0.dll
|
||||||
}
|
}
|
||||||
if { $plug_so ne $plug } then {
|
foreach plug $plugin_names {
|
||||||
set plug_opt "--plugin $plug_so"
|
set plug_so [run_host_cmd $CC "--print-prog-name $plug"]
|
||||||
break
|
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