This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit: Skip linker plugin tests if the linker is not configured to support them

Hi Guys,

  The other day I accidentally configured a Linux native linker without
  --enable-plugins specified.  When I ran the linker tests I encountered
  a whole lot of unexpected failures in the ld-plugins/plugins.exp
  directory because of the lack of plugin support.  So I am checking in
  the patch below (mainline and 2.26 branch) so skip the plugin tests
  when plugins are not supported.


2016-01-18  Nick Clifton  <>

	* ld-plugin/plugin.exp: Skip plugin tests if the linker is not
	configured to support plugins.

diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp
index 64f4079..a8b0e4a 100644
--- a/ld/testsuite/ld-plugin/plugin.exp
+++ b/ld/testsuite/ld-plugin/plugin.exp
@@ -39,6 +39,12 @@ global base_dir
 # Look for the name we can dlopen in the test plugin's libtool control script.
 set plugin_name [file_contents "$base_dir/"]
 set plugin_name [regsub "'.*" [regsub ".*dlname='" "$plugin_name" ""] ""]
+# Even though the API supports plugins it does not mean that the
+# linker was configured with --enable-plugins.  Check for that here.
+if { $plugin_name == "" } {
+    verbose "The linker is not configured to support plugins"
+    return
 verbose "plugin name is '$plugin_name'"
 set plugin2_name [file_contents "$base_dir/"]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]