]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/config/default.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / config / default.exp
index 73d61dec27207549cf0ce0115dc833ac624c2844..af313bb7dc690ce2151957331dbeff93f1937d12 100644 (file)
@@ -1,5 +1,5 @@
 # Basic expect script for LD Regression Tests
-#   Copyright (C) 1993-2020 Free Software Foundation, Inc.
+#   Copyright (C) 1993-2021 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -425,19 +425,29 @@ 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
+       }
     }
 }
+
+if {[file exists .libs/libdep.so]} {
+  set dep_plug_opt "--plugin .libs/libdep.so"
+} elseif {[file exists .libs/libdep.dll]} {
+  set dep_plug_opt "--plugin .libs/libdep.dll"
+} else {
+    set dep_plug_opt ""
+}