]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Skip linker plugin tests if the linker has not been configured to support plugins.
authorNick Clifton <nickc@redhat.com>
Mon, 18 Jan 2016 11:23:44 +0000 (11:23 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 18 Jan 2016 11:23:44 +0000 (11:23 +0000)
* ld-plugin/plugin.exp: Skip plugin tests if the linker is not
configured to support plugins.

ld/ChangeLog
ld/testsuite/ld-plugin/plugin.exp

index d20c76c2eda77aa7f7337f221a8df8c95bc792b3..ba6c46347aa5daff6d7f2229d9f65ff255f406cd 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-18  Nick Clifton  <nickc@redhat.com>
+
+       * testsuite/ld-plugin/plugin.exp: Skip plugin tests if the linker
+       is not configured to support plugins.
+
 2016-01-17  Alan Modra  <amodra@gmail.com>
 
        * configure: Regenerate.
index 64f40790d301f7a440b40049a6c0729e22161eaa..a8b0e4a245c4f26e31dd4f03cd010ac16e0ecac2 100644 (file)
@@ -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/libldtestplug.la"]
 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/libldtestplug2.la"]