+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 ...
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
+ }
}
}